We are developing a VOIP application and while there is an active call, we want not to allow other apps play music or something (like Whatsapp does).
Is there any way of doing it in a normal way, can you help please?
Edit 1:
I think we need to start with listening the observer AVAudioSessionInterruptionNotification.
Accepted Answer Edit 2:
When sound interruption begins, try to only active the AudioSession again. This works. Thank you KudoCC.
Here is a link talks about audio category, there is a table in it:
As your app supports VoIP, so it need to play and record audio, and you need interrupt non-mixable apps audio, so
AVAudioSessionCategoryPlayAndRecord
is the right category. Also you should re-active your audio session when you're playing/recording audio so that the category takes effect.