-
Notifications
You must be signed in to change notification settings - Fork 406
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
Playback resumption notification not showing for API 31+ with MediaSessionService #933
Comments
Thanks for your report. I think this is an enhancement more than a bug. The We'll use this issue to track what we find. |
I have investigated why the playback resumption notification doesn't work with a First, as mentioned in the other issue, System UI uses a documented contract of calling methods of a In the case of this issue where we advertise a I have implemented I'm having some concerns in doing such a change though. Firstly, I'm not sure whether this will be forward-compatible once SystemUI would migrate to Media3. If the contract is mapped to Media3 1:1 then you would need a The second reason is that I think for your use case you can just do a
Because your service is now using So I'd actually recommend to try this approach because I can't see any downsides of this. The only user of these methods you want to support is System UI and thats already given. No other app than System UI will get the under-the-hood treatment and called from elsewhere the default If you want this safe and now, I'd recommend to go that |
@marcbaechinger Thanks for the detailed instructions, the playback resumption notification now is appearing on later API with the MediaLibraryService in use. I did notice there is one drawback with this, it exacerbates #805. Instead of the dead notification only sticking around for the 2 minutes the service is still alive, it just stays around indefinitely, and is not replaced with playback resumption notification. I am able to reproduce this every time on a Pixel 6a following the procedure, so I hope there can be fix or workaround for #805 soon. |
Ok, cool. Glad that worked. There is nothing we can do about #805. This is a bug in Android 14 that's reported internally and being worked on. |
I tested this more, and it seems the playback resumption notification doesn't get shown on Samsung devices with Android 13/14 (not tested on 12, it does show on 11). Changing to the MediaLibraryService only added the notification on emulators and Pixel device. I guess Samsung just doesn't support the notification for the playback resumption API? 🤷♂️ |
Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue
API 31-34 emulators, some physical devices tested also
Devices that do not reproduce the issue
<= Api 30 emulators, some physical devices tested also
Reproducible in the demo app?
Not tested
Reproduction steps
This is an extension of the comments for #672, we would like to have a MediaSessionService app post a playback resumption notification on all API levels
manifest permissions:
where applicable, the POST_NOTIFICATIONS is granted at runtime prior to restarting the app and demonstrating the behavior
service declaration:
playback resumption is implemented and working on all API levels
On the stated API levels, started playback, then paused and put the app in the background
Expected result
after a couple of minutes of the app being in the background, the normal notification disappears and a playback resumption notification appears with a play button only on all API levels
On API 30, we get logs such as these:
Actual result
On the states API levels, the normal notification is removed, but a playback resumption notification does not appear
On API 31+, we get logs such as these:
Media
not applicable
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: