Skip to content

Playback resumption - How to opt-out at runtime? #770

@TomasValenta

Description

@TomasValenta

Version

Media3 1.1.1

More version details

No response

Devices that reproduce the issue

  • Pixel 7 running Android 13
  • Samsung Galaxy S21+ running Android 13

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Checkout my demo-session fork with the MediaButtonReceiver declared in the manifest and simple stop button added to the PlayableFolderActivity (full diff here).
  2. Build and run the demo-session sample.
  3. Play any song (or songs) from the example playlist.
  4. Go back to the PlayableFolderActivity and hit STOP button.
  5. A dead silent notification will appear.

Expected result

Dead silent notification should not be displayed (as it behaves when no MediaButtonReceiver is declared).

I know, I can handle the play event from the dead silent notification in the onPlaybackResumption() method (and that's how I do it too), but if I understand it correctly, this notification shouldn't show at all after calling stop() method on MediaController or not? (as it behaves when no MediaButtonReceiver is declared)

Actual result

A dead silent notification will appear.

Media

My fork - https://github.com/TomasValenta/media

Dead silent notification
image

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions