Detecting the type of iPhone interrupt

Posted by Prashant on Stack Overflow See other posts from Stack Overflow or by Prashant
Published on 2009-12-13T07:09:47Z Indexed on 2010/04/16 19:43 UTC
Read the original article Hit count: 355

I can detect that the iPhone went to sleep and came back from sleep, by using the applicationWillResignActive and applicationDidBecomeActive. But how do I find out what kind of interrupt it was. I am making an audio player application, and need to keep the audio playing when the iPhone goes to sleep (which I know how to do). But I need to interrupt the audio when a message, alarm or low battery interrupt occurs. Also I need to resume the audio when the event is over.

So how do I differentiate between these different interrupts.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c