I am using Audioplayer
for playing audio file which is 5-10 secs. My app allows background music of other apps. While playing my audio I am deactivating the other music using
[[AVAudioSession sharedInstance] setActive:YES withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
After completion of my audio, I want to play the deactivated music.
Is this possible in AVAudioPlayer
& AVAudioSession
? Or else which framework supports for this resuming functionality?
After playing your sounds, deactivate your AVAudioSession
[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With