I connected to a bluetooth headset. When a sound is played, KeyEvent.KEYCODE_MEDIA_NEXT and KeyEvent.KEYCODE_MEDIA_PREVIOUS are accepted in my BroadcastReceiver . When sound does not play, my receiver is not called for these key events.
In the same state, when the sound does not play, the same receiver is called to play / pause, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE , so I know that this is not a problem for my registrar that is not registering.
As soon as the sound starts to play, I see through the logs that when the sound did not play, all KeyEvent.KEYCODE_MEDIA_NEXT events were queued and retransmitted after the sound started. Each of these events comes with KeyEvent.ACTION_DOWN.
Is this normal behavior? Do you use the following and previous buttons with Bluetooth only when playing sound?
source share