Skip to content

Support playback resumption on Android Auto connect #248

Description

@mapitman

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions