Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice for AVRCP on Android (sending meta-data to bluetooth device)

I want to send meta-data to a bluetooth device, via an Android 4.3+ device.

The solution that I came across, and that works, is sending an intent to google.android.music (the google music app), informing it about the meta-data, as seen here: send track informations via A2DP/AVRCP. I might be wrong, but this does not seem to be the way AVRCP should work on android.

As far as I understood, the best practice would be to use RemoteControlClient.MetadaDataEditor like so:

        mRemoteControlClient.editMetadata(true)
                .putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, playingItem.getArtist())

This is actually advised by google themselves as the best practice: http://youtu.be/EC5-cEbr520?t=25m18s

The problem is that I cannot make my app to send meta-data to the bluetooth device with the advised RemoteControlClient.MetadaDataEditor class, but using the intent to the google music app it works.

Does anybody know why this happens? What is the most correct way to send meta-data to the bluetooth device? Thanks!

like image 859
Pedro Lopes Avatar asked Nov 10 '22 14:11

Pedro Lopes


1 Answers

The solution is to use METADATA_KEY_ALBUMARTIST instead.

like image 100
bracken Avatar answered Nov 14 '22 21:11

bracken