Hi,
Here's what currently happens in my app:
Locking: iPhone Lock Button Pressed -> Audio Paused
Unlocking: iPhoneUnlocked Button Pressed -> Audio Resumed -> Slide to Unlock -> App Appears
I want the Unlocking sequence to be:
Unlocking: iPhoneUnlock Button Pressed -> Slide to Unlock -> Audio Resumed -> App Appears
I am using OS 2.2.1 and AVFoundation Framework, and here's what I have already tried:
I tried to use applicationWillResignActive and applicationDidBecomeActive callbacks of the AppDelegate, it doesn't work. Although applicationDidBecomeActive is called at the correct time (i.e. when user has slided to unlock the device), the audio gets resumed as soon as unlock button is pressed (I guess it is because of the audio sessions), so I tried:
I implemented audioPlayerBeginInterruption and audioPlayerEndInterruption selectors of the AVAudioPlayerDelegate, it looks like these methods never get called (I have placed log calls). I'm sure I am setting the delegate properly since audioPlayerDidFinishPlaying is correctly called when an audio file has finished playing.
Any ideas? :-)
P.S: I am testing on device if that wasn't obvious