how to resgister my MusicPlayer App to OnAudioFocusChangeListener
问题 I am creating a music player app. I want: When the user plays a song using my app, then the default music player should get stopped(is playing) And if some other application starts playing when my app is already playing then mine should get stopped. I am able to work out with the 1st point using Audio Focus. But for the 2nd point, i.e. Handling AUDIOFOCUS_LOSS , i'm facing some issues. Problem: I've followed the documentation but how should I register my music player service to detect that