My issue is the HUD that accompanies a change in the MPMusicPlayerController's volume property. Whilst there is a solution, I want to know if it is acceptable by Apple to hide the MPVolumeView to prevent the HUD from showing?
And on another note, if I choose not to use the MPVolumeView class, will the user still have the option to play audio from the app on an AirPlay device via the multi-tasking bar?
Submitted my app and it was acceptable. It seems that it is OK with Apple to use the described method.
Related
I wonder if there is any way to disable microphone programmatically (to get rid of the red bar in the background)?
I use OpenEars to listen for commands in the app. When I go to the background red bar appears (which is obvious, as microphone is active).
The problem is that the microphone is active even when OpenEars is suspended. To avoid unnecessary questions I cannot stop OpenEars as it ends up with mixing audioSession with my other sources.
The "red bar" will never disappear, even when the microphone is not in use by your application unless you explicitly stop the audio session. This is a security measure Apple has put in place to alert users of your application that it is listening to their microphone, even if you aren't doing anything with the microphone data at that exact moment.
If you are using AUAudioUnit, you may have some luck setting isInputEnabled to false.
I'm not sure if it falls into stopping OpenEars case per se, but have you tried switching AudioSessionCategory when your app goes into background/suspended mode? If you switch to a category that doesn't allow microphone input, my guess is it would stop the microphone.
Then you could reset to the correct category when your app resumes.
To achieve my goal,i need to play no-sound audio when users put my app into background.However,i don't want users to know that the app is playing no-sound music on background.But the interface(rewind and volumn buttons)on the lcokscreen can be deceived by users.Therefore,i am searching a method to hide them? I don't want to talk about whether my app will be refused by Apple or not, i just want to hide default interface on lockscreen. It is really appreciated if somebody can help me.
I have a music player app which implements background audio. I’m trying to update the screenshot in the iOS7 multi-tasking switcher when the track changes. So, if I background the app during Song A, it finishes and Song B comes on, if I then go into the tray I’d like to see a screenshot showing Song B’s artwork, title, etc.
I’ve done some digging and not managed to find any way to tell iOS to update short of implementing Background Fetch and going all out with that. Is there another means of doing this, something I can call to tell it to refresh it when my tracks change?
Apple does not provide any means of doing this. Even iOS own media player does not have this ability.
I'm using SPPlaybackManager and i saw that there is support in Airplay , but i can't find any function that activate the airplay , the only support i see is when i press the home button twice swiping right till i see the airplay button.
is there any way i could make an custom button on my view that when i press on it it will pop up all the NEAR-BY devices using cocoalibspotify?
i saw it is possible with MPVolumeView... but nothing with spotify.
will appreciate if any of you fellows could direct me a bit cause i try to search and didn't found nothing about this subject.
Thanks in advance
MPVolumeView is the thing to use - the AirPlay setting is system-wide. As such, there's nothing in CocoaLibSpotify specifically to do with AirPlay.
I have an iPad app and I have a video playing in a view. I would like to play video using Airplay but by pressing my own button.
I have set allows airplay = YES and so forth, this works if I enable the full controls, but I want to set no controls and have my own button to play the video using Airplay.
So far, I have found no information that would allow me to play a video on AppleTV without allowing the normal controls.
So just using an UIButton action to force the airplay, or at least get available devices and set it manually. Anything that would allow me to do this.
MPVolumeView will only control audio, it won't control video. For that you'd need iOS 5's AVPlayer, or a movie controller.
An alternative for you might be to use AirplayKit, a 3rd party library.
https://github.com/rothacr/AirplayKit
To answer my own question.
This is quite possible without jailbreak.
Here is apple's own page explaining this, so this will pass the review process.
Apple developer library document explaining how to do this