2

I am working on an Android app and one of things I'd like for it to be able to do is to send metadata via A2DP / AVRCP to my car radio and I cannot seem to get my car to pick up the metadata. I use PocketCasts as my podcast app and their app works with no issues.

My code below works on my Pebble, but it seems my car is expecting some extra fields before displaying the metadata on the radio. Wondering if there is any other way to send data except by using the Android Music Metachanged Intent -- seems a bit hacky.

public void sendMetadata() {

    Intent avrcp = new Intent("com.android.music.metachanged");
    avrcp.putExtra("id", 100);
    avrcp.putExtra("track", "Test Track");
    avrcp.putExtra("artist", "Test Artist");
    avrcp.putExtra("album", "Test Album Name");
    sendBroadcast(avrcp);
}
mattdonders
  • 1,328
  • 1
  • 19
  • 42
  • Did you got succes on this issue, 'till now? I am stuck with the same problem. Google play music is able to send meta to my car bluetooth radio without problem, but the code which apparently was working for developpers a while ago do not seem to work any more. There should be something additionnal that we forget, because the code you refer is still used in current MediaPlaybackService from Android : https://android.googlesource.com/platform/packages/apps/Music/+/android-5.1.1_r13/src/com/android/music/MediaPlaybackService.java. They send a sticky broadcast, but it is basically the same. – LM.Croisez Aug 30 '15 at 11:04
  • 1
    Just found a relevant response on Stackoverflow: http://stackoverflow.com/a/29686395/1523553 – LM.Croisez Aug 30 '15 at 12:11
  • See my answer [here](http://stackoverflow.com/a/33221137/3944092) for sending metadata via A2DP/AVRCP. – Christian Ehrl Oct 19 '15 at 18:23

0 Answers0