Android: MediaPlayer AUDIOFOCUS_LOSS & setOnErrorListener() issue
问题 I'm creating a music player app. In that I am checking if my application loses AudioFocus then the playback will stop. But this is raising one issue that when I play a track - then stop it and - then play a track again, switch case AudioManager.AUDIOFOCUS_LOSS is getting called in which I've stopped the player as it is losing focus. So my own app is losing focus to itself. Obviously, these were not my intentions. I wanted it to get called when some other music player requested focus. private