2

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

Auguste
  • 2,007
  • 2
  • 17
  • 25
issamux
  • 1,336
  • 1
  • 19
  • 35
  • well decompiling some apk that support AVRCP, show some logic in onCustomAction(String action, Bundle extras) methods. But how to fire Event ? should add custom Action in Bluetooth implementation stack ?!! – issamux Jun 06 '16 at 23:09

1 Answers1

2

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

issamux
  • 1,336
  • 1
  • 19
  • 35