I wonder, if there's a way to get reason of applicationWillResignActive being called?
I'm developing an audio app, and I want to continue recording sound when the screen is auto locked, but I want to stop recording when incoming call occurs. How can I do that?
You can simply use the AVAudioSessionDelegate protocol methods like: beginInterruption
and/or endInterruptionWithFlags:
to check if the recording is interrupted and than you can do whatever you need.
In this case this approach has an advantage over registering to telephony events, because it works all the time recording, and not only for the first 10 minutes.