Closed mcorcuera closed 2 years ago
I welcome contributions, although note that you can already set global extras via:
and you can set per-item extras via:
https://pub.dev/documentation/audio_service/latest/audio_service/MediaItem/extras.html
Thanks for the quick reply! I didn't know about the androidBrowsableRootExtras
, it worked as expected.
Regarding the flags on the MediaItem
, for what I can see in the code, they are set as the extras of MediaMetadata
object created. However, there are some extra flags that need to be set on the MediaItem
or the MediaDescription
objects. Would it be possible to provide a way to also set the extra flags on those objects?
Ah, the intention was for the item extras to transfer across. If it is not working, then would you be interested in contributing a fix?
Sure! I'm pretty sure they are not propagating but will retest. If that's the case I will be happy to contribute a fix for that.
I have investigated the issue and it seems that some of the flags were only introduced after version androidx.media 1.5.0, so that's why they were not propagated.
Would it be possible to update the library version?
It can be changed in the build.gradle
file. If you are able to try that out, let me know if it solves your issue.
Updating to the new version made the Metadata options available. However, the extras were not being propagated to the MediaItem's description, because on how the description is created as part of the MediaMetadata object. I have made some changes to it on the PR. Let me know what you think.
Closed by #943
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.
Feature proposal
audio_service
already supports basic functionality for Android Auto. However, the support is limited and there are certain things available on the AndroidAuto media app interface (described here: https://developer.android.com/training/cars/media) which are not available through audio_service. Some of them are:BrowserRoot
orMediaDescription
objectsMediaItem
andMediaMetadata
extrasMediaMetadataCompat
andPlaybackStateCompat
to link ongoing content to media items in the browse viewMotivating use case(s)
This will allow users to completely integrate with AndroidAuto media player without having to use another plugin. Also, I'm not sure if it would be possible to create a separate plugin to handle this, as AndroidAuto relies on
Media Browser Service
which is also the base ofaudio_service
.I will be happy to contribute to this feature as we are planning to add Android Auto support to our podcast app.