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
Always-on Display Is Not Updated Dynamically #246
Comments
same here with Media3 on Pixel 6a. but I am not using the demo app. local file with title set shows on both notification and always on display. Online radio with title not set, shows only on Notification but No Title on always on display |
Thanks for the excellent bug report! However, I can not repro this as far as I do the steps correctly and understand the issue. Media3 implementation From Media3 side I see that metadata of the session and the notifcation is updated accordingly, when the player's metadata has been reported to change:
That pretty much meets the expectation, even if the the metadata is not really precisely updated. In the example above manual UI testing I followed the steps above and after starting playback I go to the lock screen and I see "No title" of the current program above the station I have tested with Pixel 6 Android 13, a Pixel 5 on U and a Pixel 4 on Android 12 (settings in Android 12 are under I have seen these cases on the always on screen without interaction:
From this I can't see something is not working as expected. Can you confirm I tested the right thing? |
for me the Always-on Display never displays anything other than "No title" - even if I wait 30+ minutes. Steps to reproduce are the five steps mentioned in the bug report. The difference is probably device-specific, since you experienced a different behavior following the same steps. An additional information that might be helpful: My bug report was the result of a ticket opened for my radio app. The reporter noted that the Always-on Display used to work in the version of my app that still used support.v4.media. My app used to update the metadata like this: in/via
... and this seemed to prompt the Always-on Display to update |
@marcbaechinger I have this issue, not when using local Implementation of converter:
|
I'm not sure where always on display is getting this information from to be honest. Are saying that it works with ExoPlayer but not when you are casting?
then paste this here? I also wonder if this is API level related. Can you repro this on different API levels/devices? The interesting buckets that come to mind is up to API 30 and from API 31 and above. |
Hi @marcbaechinger sure. I am doing this on Android 14: dump when playing locally:
Dump when casting:
Looks kind of weird, the media3 session when casting has the following data:
And when playing locally:
So the artist should be "NPO 3FM" and is shown like that on AOD in both cases, but the title is missing. When playing locally the "ERIC PRYDZ - PJANOO" song is loaded dynamically by But I suspect the |
Thanks for sharing the dump. It's a bit unclear to me what the issue is I'm afraid. I think the interesting thing is that the number of metadata keys is smaller when playing with cast I'm trying to repro this, but it looks quite difficult as for me the AOD doesn't seem to work consistently. It appears to me that it works with UAMP intermittedly and I haven't figured out yet why this is. Do you have a The library updates the platform session here and the player that is used is the player passed to the session. I need to dig some further here when I find some time. |
Hi @marcbaechinger thanks for the response. I am indeed using a wrapping Playing locally when song is loaded:
Switch to casting:
Switch back to local playback
So it appears that the For reference the
|
Your |
@marcbaechinger I guess I could augment the metadata in the |
Calling the listeners as you say should be sufficient I think. The session registers a listener to the player that is set on the session. So it would trigger |
Hi @marcbaechinger conceptually that doesn't make much sense in my head but I've tried having a list of external listeners in the
I am guessing we need some kind of This kind of works, but looks hacky and sometimes crashes when player somehow doesn't have a
|
I've solved this issue by updating all |
Media3 Version
1.0.0-beta03
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
I maintain an Android radio app. The app displays the currently playing song in the notification. Media3 automatically updates the notification when no
Title
has been set inMediaMetadata
of aMediaItem
- which is pretty neat (see also #153).The Always-on Display on the other hand is not automatically updated.
To reproduce:
Expected result
In the Always-on Display the same Title should be displayed as in the Notification.
Actual result
The Always-on Display displays "No title", when a title has not been set.
The photos above are from a fork of the demo-session app (see y20k@2e722ac).
Media
I added a radio station to demos/session/src/main/assets/catalog.json in a fork of the demo app to test the issue.
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: