iOS4 and audio playback during backgrounding - iphone

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

Related

When playing a movie through a UIWebView, and then outputting to AppleTV via Airplay, turning off iPhone screen stops playback. Why?

When playing a movie through a UIWebView, and then outputting to AppleTV via Airplay, turning off iPhone screen stops playback. Why?
Anyone know how to solve this so AirPlay continues when the screen is off with my app?
Doing these two things solved it for me:
Airplay of audio using AVPlayer does not work in the background (Put the key "audio" as the key in the XML of the property list)
UIWebView: HTML5 audio pauses in iOS 6 when app enters background
Looks like it works for video too!

iOS - Access output audio from background program

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.

MPMoviePlayerController playback problem

I'm having trouble with playing audio stream using MPMoviePlayerController in the background. On the foreground it's playing the audio just fine, but when the application goes to the background, sound disappears and the time keeps going. I have initialized the AVAudioSession with AVAudioSessionCategoryPlayback and have put the required background modes to audio in info.plist file. Also I have set player.useApplicationAudioSession = YES;. What could be the possible problem here? Thanks in advance :)
This ios background link indicates that the useApplicationAudioSession property value should be set to NO for iOS 3.2 and newer. (I have an app that does this and it works fine in background mode.

MPMoviePlayerViewController and background audio

I am having trouble playing audio inside a MPMoviePlayerViewController in the background. I can point it to mp3's just fine and listen to the audio, but when I go into the background, I don't hear audio anymore.
I set the plist entry to keep playing audio and set the audio session toAVAudioSessionCategoryPlayback. When I hit the home button, wait a few seconds, and go back to the app, the audio advanced as if it had kept playing, I just can't hear a thing when the app is in the background.
Any idea what causes this?
Thanks!
I just tested in the simulator, and it fails there. It does work fine on the device though. Must be a bug in the simulator.

IPad videos don't play after multiple runs

I'm working on an IPad application (iOS 3.2) that plays a couple of videos using the MediaPlayer framework. After running the app for a while videos don't play anymore. The video is loaded, meaning i can buffer through it but it's started in pause mode and cannot be set to played. Each time i press play it pauses again. After restarting the device videos behave normal again.
Does anyone have any idea why this strange behavior happens?
Found the solution that worked for me. If i set the MPMoviePlayerController's useApplicationAudioSession to NO then videos play normally.