Goal
When a phone connects to a car (or the DHU) with nothing currently loaded, Android Auto expects the app to offer to resume the last-played episode rather than showing a blank now-playing screen.
Scope
- Implement
MediaSession.Callback.onPlaybackResumption, resolving the last-played episode from SettingsDataStore's persisted "last playing item" (already tracked for process-death resume, see PlaybackController/PlaybackService.playNextQueued's setLastPlayingItem calls) through PlaybackMediaItemFactory.resolve.
- If there's no last-played item (fresh install, or it was cleared on natural completion), fall back to the Next Up head, matching what tapping "Next Up" in the browse tree would play first.
Testing
Play an episode, fully close the app (kill the process), then reconnect to the Desktop Head Unit and confirm Auto's now-playing screen offers to resume that episode without the phone screen needing to be touched first.
Goal
When a phone connects to a car (or the DHU) with nothing currently loaded, Android Auto expects the app to offer to resume the last-played episode rather than showing a blank now-playing screen.
Scope
MediaSession.Callback.onPlaybackResumption, resolving the last-played episode fromSettingsDataStore's persisted "last playing item" (already tracked for process-death resume, seePlaybackController/PlaybackService.playNextQueued'ssetLastPlayingItemcalls) throughPlaybackMediaItemFactory.resolve.Testing
Play an episode, fully close the app (kill the process), then reconnect to the Desktop Head Unit and confirm Auto's now-playing screen offers to resume that episode without the phone screen needing to be touched first.