How to send different metadata to different controllers
@marcbaechinger is already working on this.
Since Mar 25, 2026.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Context: I want to implement "Car lyrics" feature, where the lyrics of the song are sent to the Car via Bluetooth AVRCP's song title field. Android automatically converts MediaSession metadata to AVRCP, so what I need to do is to change the MediaSession's metadata from Bluetooth.apk point-of-view, to change song title and artist fields. That is easy enough, for example with ForwardingSimpleBasePlayer.
However, I do not want every connected controller to be affected by this change. For example, my own app's UI, or external scrobbler apps (they listen to session metadata to create a listen history of the user, and sending lyrics in song title field will make them think the user is constantly switching song). Notably, I do not control external scrobbler apps, so I cannot resort to a custom command exchange for metadata.
I am aware of the caveat that media3 can only provide one MediaMetadata for all the legacy controllers due to platform limitations. However, in theory, media3 could provide one MediaMetadata for legacy controllers and some media3 controllers and another MediaMetadata for other media3 controllers. This would then work better for my usecase as more apps migrate to media3 controllers.
What is the best approach to implement this feature in your opinion? I can't really figure out a good hook point for this.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.