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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -