-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MediaLibraryService can't reject System UI playback resumption notification on API 30 #355
Labels
Comments
marcbaechinger
changed the title
MediaLibraryService can't reject SYstem UI playback resumption notification on API 30
MediaLibraryService can't reject System UI playback resumption notification on API 30
Apr 25, 2023
For Media3 1.0.1 there is no fix besides not adding
to the intent filter of the We are working on a fix for this. |
1 task
icbaker
pushed a commit
that referenced
this issue
Apr 27, 2023
To reliably reject the System UI playback resumption notification on all API levels (specifically API 30), the backward compatibility layer needs to return `null` for the library root. This is not possible in the Media3 implementation. This change allows an app to return a `LibraryResult.ofError(RESULT_ERROR_NOT_SUPPORTED)` that then is translated to return null by the backwards compatibility layer. Issue: #355 Issue: #167 Issue: #27 See https://developer.android.com/guide/topics/media/media-controls#mediabrowserservice_implementation PiperOrigin-RevId: 527276529
icbaker
pushed a commit
that referenced
this issue
May 17, 2023
To reliably reject the System UI playback resumption notification on all API levels (specifically API 30), the backward compatibility layer needs to return `null` for the library root. This is not possible in the Media3 implementation. This change allows an app to return a `LibraryResult.ofError(RESULT_ERROR_NOT_SUPPORTED)` that then is translated to return null by the backwards compatibility layer. Issue: #355 Issue: #167 Issue: #27 See https://developer.android.com/guide/topics/media/media-controls#mediabrowserservice_implementation PiperOrigin-RevId: 527276529 (cherry picked from commit 7938978)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Media3 Version
Media3 1.0.1
Devices that reproduce the issue
All devices on API 30
Devices that do not reproduce the issue
Devices on API below 30 and above API 30
Reproducible in the demo app?
Yes
Reproduction steps
To reproduce the issue, please follow these steps:
See https://developer.android.com/guide/topics/media/media-controls#mediabrowserservice_implementation
Expected result
The System UI playback resumption notification is not shown.
Actual result
There is a System UI playback resumption notification after the demo app has been treminated.
It's currently not possible to do that with
MediaLibraryService
on API 30.On API 30, allowing to connect a browser the MediaBrowserService seems sufficient for posting a playback resumption notification. onLoadChildre/onGetChildren is never called with package com.android.systemui:
On API 31, the browser with com.android.systemui insists in calling onLoadChildren/onGetChildren and checks whether there is a playable child.
Media
Any media of the session demo app
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: