iphone - iOS AVAudioPlayer makes other app's background music stopped -
I have an exercise app that needs sound play I use the aviadio player to play sound but when the audio When the play starts, the background music stops with another app (radio streaming app).
How can I not disrupt it in background music? Because I want the user to listen to music while exercising
Thank you.
You can use the following code where you use AVAudioPlayer: < Pre> If you want to set up a delegate, you can add this line of code: // set audio session NSError * sessionError = zero; [[Avidio Session Shared Instance] Set Category: Avidio Session Category Intent Error: And Session Error]; [[Avidio Session Shared Instance] set active: yes error: and session error];
[[Avides session shared instance] setDelegate: Self];
Comments
Post a Comment