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> // 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];

If you want to set up a delegate, you can add this line of code:

  [[Avides session shared instance] setDelegate: Self];    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -