I'm compiling using iOS4. When I launch my application that uses UIImagePickerController and iAds the iPod music halts and doesn't continue in the background? Any settings I have to add to my app?
Thanks
Are you playing any music or sounds from your app? If so, it will mute the iPod.
Related
Video sound not playing in IPhone in silent mode? How to fix the same? When in silent mode the video sound is on mute. This is a hybrid app for IOS created with Phonegap. When the Iphone is switched to normal mode the video sound plays properly.
All:
I have had many apps that play audio in the background when the user hits the home button or puts the phone to sleep. These apps have worked for years from iOS4 through iOS7.
Now in iOS8 the background audio playing sometimes works and sometimes doesn't. I have not changed any code in the apps. Is there something that has changed with iOS8 that has stopped apps from playing audio in the background?
Thanks
Scenario: My app is running in the background. An iPhone/iPad user launches the iPod app (or Pandora or another program that plays audio) on their device and starts playing music. My app detects that that music is now playing, and records or in some way does things with the current playing audio (like stream it to a server), all while still running in the background.
Is this possible? Can anyone point me in the right direction in the SDK on how to do this?
You can't do this. And that is that.
I have ported an iPhone application from iPhone 3.0 to support now in iOS 4.0. In this application, it does playing an audio file streaming. With the iPhone 3.0 app version, when playing streaming audio if i quit my app by pressing Home button, it will stop the audio too. This is expected.
In this latest my app version with iOS 4.0, if i quit my application when audio is playing by pressing Home button, i don't see playing the audio continuously in the background though i exited to home screen. Do i need to handle anything extra to play audio even after exit by pressing Home button? (or) is it still not supported in iOS 4.0 too? I use AudioToolBox to play audio files in queue based streaming.
Please advise.
Thank you.
You need to add this to your Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
use this category if your using an audio session or avAudioPlayer
1.AVAudioSessionCategoryPlayback
or 2. kAudioSessionCategory_MediaPlayback
When my app is backgrounded, the audioplayer continues to play, but i cant hear any sound. When i open my app again, it plays from the point where it would have been had the app not been backgrounded at all. This shows that the app is playing in the background though it is not audible. Why could this be happening?
I have set the audio key in the info.plist for the UIBackgroundModes array. Also my audioplayer is set to the "AVAudioSessionCategoryPlayback" category with an override to allow for audio mixing. So what am i doing wrong that im unable to hear the audio even though it is playing in the background?
Could this be an issue with the simulator alone as i have not been able to test this on a device with iOS4 so iv only been testing it on the simulator.
It's an issue with the simulator most likely. I implemented what you stated and it works just fine on the device: Entering background on iOS4 to play audio