New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android MediaItem is not updating on car display through bluetooth #908
Comments
Yes, but this doesn't say anything about icy metadata. There is in fact no notion of icy metadata within this plugin, there is only If you want to keep this issue open, you will need to provide an actual minimal reproduction project and describe specifically which "audio_service" API isn't working. For example, is it |
Hello, thanks for the quick reply, I'll provide a minimal repro project in the next hours.
|
I think for a "minimal" reproduction project, you don't actually need ICY metadata because audio_service is ignorant of what the data means. If the API that's failing is |
Hello, I've published a repo: https://github.com/bypass112/audio_service_bt |
Maybe this a more widespread bug in Android Auto? It seems to be happening even in Spotify: https://support.google.com/androidauto/thread/100067522/spotify-changes-song-but-does-not-update-the-title-or-album-on-screen?hl=en-gb |
Yes, Spotify seems to had this problem: https://community.spotify.com/t5/Ongoing-Issues/Wrong-metadata-displayed-on-car-radio-via-Bluetooth/idi-p/5154639#comments
Maybe the Smartwatch display works fine because the phone isn't sending extra info through the Bluetooth audio channel? Something else I've noticed is that when the phone is locked the car commands Play/Pause have a delay compared to when the phone isn't locked. Maybe the phone is deciding to reduce the priority/bandwidth of the Bluetooth connection? |
If it's in Android, that doesn't bode well for fixing this. Android bugs reported to Google can take years before they're addressed, if ever. I think the best shot will be to try to find an open source Android app that has the desired behaviour (e.g. if it has some workaround we don't know about), and then emulate what it does. |
Documented behaviour
Broadcasting state changes
Your audio handler must broadcast state changes so that the system notification and smart watches (etc) know what state to display. Your app's Flutter UI may also listen to these state changes so that it knows what state to display. Thus, the audio handler provides a single source of truth for your audio state to all clients.
Broadcast the current media item:
class MyAudioHandler extends BaseAudioHandler ... {
...
mediaItem.add(item1);
...
Actual behaviour
While having an Android connected to the car Bluetooth media, the current MediaItem metadata won't update if the phone screen is turned off and if the player is connected to an ICY stream.
The metadata will update after interacting with the Android notification, or car controlls, but not on itself.
On the iOS side this works fine and also while having the Android connected to a smartwatch, or an Android device with the screen on.
Minimal reproduction project
Official example: main.dart
Reproduction steps
Output of flutter doctor
Devices exhibiting the bug
All versions of Android with api level >= 28.
The text was updated successfully, but these errors were encountered: