iOS Notifications by the system for an audio application in background
I have an audio recording/playing application. It runs in the background. When it goes to the background, and if any other au开发者_如何学Pythondio application is opened or starts using the audio resources, I want to handle my application appropriately.
iOS provides a way to send such notifications as seen in the ipod player. When it goes into background, and another audio app is opened, the ipod player detects it and stops playing.
How do you detect it? Are there specific notifications/interrupts that will be sent to your background app?
Thanks
You don't have to listen any types of notifications, you can configure your AVAudioSession to handle all this stuff for you. All you have to do is set appropriate category. In case of other apps, they just set AVAudioSessionCategorySoloAmbient so iPod app have to silence itself.
精彩评论