feat: Android Auto β browse & play playlists, Liked Songs and Discover Weekly#3064
Open
gituser-vibes wants to merge 1 commit into
Open
feat: Android Auto β browse & play playlists, Liked Songs and Discover Weekly#3064gituser-vibes wants to merge 1 commit into
gituser-vibes wants to merge 1 commit into
Conversation
β¦ Weekly Implement the audio_service media-browser hooks so Android Auto (and other media browsers) can browse the library and start playback: - getChildren exposes Liked Songs, a "Browse" folder (the home / "Made for you" hub β including Discover Weekly, fetched via browse.sectionItems since the section preview omits it), and the user's saved playlists. - Collections are browsable into their track list with a "Play all" entry; tapping a track plays the collection from that point. - playFromMediaId resolves the selection and plays through the existing AudioPlayerNotifier.load pipeline. - Add an explicit shuffle MediaControl + custom action (Android Auto does not reliably render a toggle from the standard ACTION_SET_SHUFFLE_MODE alone). - Retry auth-sensitive requests: the stored token is often stale on cold start and the first call 401s before the plugin refreshes it. - Browse-item artwork uses http(s) URLs only β the media-browser process cannot read app-private file:// paths. The MediaBrowserService and automotive_app_desc.xml were already declared in the manifest, so no native changes are required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Android Auto (and general media-browser) support: you can browse your
library and start playback from the car head unit, including the "Made for you"
hub.
What you get
how Discover Weekly / Daily Mixes / Release Radar are reached β they are
not returned by
me/playlists; they come frombrowse.sectionItems(thesection preview from
browse.sectionsomits them).tapping a track plays the collection from that point.
Implementation notes
getChildren/playFromMediaIdonMobileAudioService;audio_services.dartnow passesrefso the hooks can read providers.AudioPlayerNotifier.load(...)pipeline.MediaControl.custom(Android Auto doesn'treliably render a toggle from the standard
ACTION_SET_SHUFFLE_MODE); iconsadded under
res/drawable.stale and the first request 401s before the plugin refreshes it.
app-private
file://paths).MediaBrowserService+automotive_app_desc.xmlwere already declared,so no native manifest changes were needed.
Depends on
The headless cold-start fix (#3063) β without it the app hangs when
Android Auto cold-starts it. Recommend merging that first (or together).
Testing
Built and exercised via the Desktop Head Unit on a Pixel 9 Pro: browse β
Made For You β Discover Weekly β Play all, plus shuffle and tap-to-play-from-track.