D
D
Denny2021-11-14 18:52:41
Android
Denny, 2021-11-14 18:52:41

How to find out the name of a track via Bluetooth?

There is a Chinese car radio on Android 8.1.
I play music via Bluetooth from my smartphone.
The radio tape recorder can act as a receiver.
Regular application shows the name of the track, artist and duration. The application does not have its own widget, so I want to create my own.
Programming skills are not enough, so I'm trying to implement software. The Kustom widgets application on a smartphone displays the current track, taking it from the system, but it does not see such information in the radio tape recorder ...

I decided to intercept the intent in the tasker with further transfer to kustom.
Found intent in logs

android.bluetooth.avrcp-controller.profile.action.TRACK_EVENT

And his extra
android.bluetooth.avrcp-controller.profile.extra.METADATA
android.bluetooth.avrcp-controller.profile.extra.PLAYBACK

playback contains the current playback state and the current position. Everything is ok here.
Metadata should contain information about the name and artist, but instead of this there is only [email protected]набор.букв.и.цифр

Here the avrcp controller code from Google
https://android.googlesource.com/platform/framewor... If

I'm intercepting the wrong intent, if I missed something ... Because all the information about the track is visible in the logs.
In general, I ask for help.)))

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question