Stop audio playing when another app's audio comes in
I would like to know how do I implement the behaviour, so that my radio streaming would stop playing if other audio would come in to play - for instance, user starts playing music, makes a call etc. In other words, how does my ExoPlayers knows that other audio is being played, or if it doesn't, do I have to listen for mediaplayer and call events? Here is an example i made for an audio state manager , you can use it as a template. (created in 2016) As per the question - You need to use an OnAudioFocusChangeListener , Read the comments in the example: public class AudioStateManager { private