My app runs audio file I want my app to stop audio playback if another app audio starts playing I do not want two audio to interrupt each other. After the second app is playing audio, my app will start playing the audio again. How can I create it? Thank you.
Depending on how your app is running. While the application is running in the foreground (users are considering your screen) or if you have a "service" that is currently in the background and you want to continue the music (Ganga, Lazy Radio etc.) How are you going to handle these things different? Android uses internal system states, to determine which apps should put audio on the speaker. All these audio-manager requests are handled by Audio Focus () Release Audio Focus (), System Call would like to see you the most. For more detailed explanation see the Android Developer API, where you can explain it and document it quite well
No comments:
Post a Comment