Since requestAudioFocus(AudioManager.OnAudioFocusChangeListener l, int streamType, int durationHint) is deprecated in API O , how do you set audio focus change list
requestAudioFocus(AudioManager.OnAudioFocusChangeListener l, int streamType, int durationHint)
Try to use setOnAudioFocusChangeListener()