Search code examples
androidbluetoothavrcp

Bluetooth AVRCP Shuffle Repeat command


I'm developing an application kind of android music player.

I can't handle (send/get) shuffle/repeat command, information to a remote Bluetooth device.

I'm using the

MediaPlaybackService and 

MediaButtonIntentReceiver 

to handle

 android.intent.action.MEDIA_BUTTON 

command .. so Play/Stop/Pause are well detected.

My question is how to register for Shuffle/repeat, and get notified to handle this command. Any more information about those command in Bluetooth AVCRP.

FYI I'm using an Android 5.x version mobile.

Thanks


Solution

  • Solved it myself.

    Shuffle Repeat command are a bluetooth AVRCP vendor dependant command. It need some Bluetooth profile stack customization ... In Samsung device I was able to detect some action by overriding onCustomAction in my MediaSession callback. In other devices should have a receiver registred with the good actions.

    Voila