androidx / androidx/media

OnePlus devices is stopped from notification controller after being IDLE

Open
#3,218 6 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 13, 2026.

question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

We have noticed a strange pattern for OnePlus devices. When playing content, pausing and waiting for a certain amount of time (can be 10 mins up to several hours) the player will be stopped and put in a IDLE state.

When the users come back to the app and try to play content again, it works most of the time but in some cases the player simply goes silently from BUFFERING back to IDLE. The users end up in a "stale" player that can not resume playback. Shutting down the service and starting it again seems to be the only way to recover.
We have extensive logging across the player path, but none of the usual suspects fire: no onPlayerError, no onPlayWhenReadyChanged due to audio focus, no playback suppression, no onPlaybackResumption callback, no ForegroundServiceStartNotAllowedException, manifest still valid.

It is very difficult to reproduce this and usually one happens after the player has been in a IDLE state for a long period of time.

I know this might be difficult to answer but I was wondering if someone else has seen a similar pattern and if you have any advice on where to go from here.

Our setup follows the session_service demo closely: a MediaLibraryService (so we also serve Android Auto), hosting a ForwardingPlayer that wraps ExoPlayer with handleAudioFocus = true. The in-app MediaController connects via SessionToken. Standard MediaNotification.Provider, foreground service. Media3 1.9.2.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.