5

So I'm currently developing a SIP dial app and I was wondering how I could change the displayed information on a Bluetooth CarKit. I route the audio to the carkit using :

    AudioManager localAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
    localAudioManager.setMode(0);
    localAudioManager.setBluetoothScoOn(true);
    localAudioManager.startBluetoothSco();
    localAudioManager.setMode(AudioManager.MODE_IN_CALL);

And I am wondering: How am I able to set the caller info on the bluetooth device? I wasn't able to find this anywhere on SO. To be extra clear this is what I see during an active conversation:

call

I also use a library for SIP conversations called PortSIP. Maybe they have influence on what to display? I don't know. Any ideas are welcome. I've already tried searching on options for AudioManager, the only option I can imagine that leaves room for metadata is audioManager.setParameters(), but I can't find what the possible key value parameters are for this function.

Update: Also tried to show info like trackinfo, but still didn't succeed. This is the code I've tried:

    Intent intent = new Intent("com.android.music.metachanged");
    intent.putExtra("track", "test");
    intent.putExtra("artist", "atest");
    intent.putExtra("album", "btest");
    context.sendBroadcast(intent);
Cœur
  • 37,241
  • 25
  • 195
  • 267
jobbert
  • 3,297
  • 27
  • 43
  • Did you take a look at this question + answer? https://stackoverflow.com/questions/21246028/best-practice-for-avrcp-on-android-sending-meta-data-to-bluetooth-device – Bart Burg Oct 09 '17 at 11:43
  • Plus this one? https://stackoverflow.com/questions/15527614/send-track-informations-via-a2dp-avrcp – Bart Burg Oct 09 '17 at 11:43
  • Checked them as described in post, but they seem to be MediaPlayer exclusive. Will also check with controls, found a post that metachanged has no effect without controls. – jobbert Oct 09 '17 at 15:22

1 Answers1

2

I found a post that explanes how to send metadata information from your phone to a connected audio bluetooth device.

If you just want to send metadata information from your phone to a connected AVRCP compatible audio bluetooth device and DON'T want to control your app from the bluetooth device at all, check the post below.

This is the post

Peter D
  • 172
  • 3
  • 11