-
Notifications
You must be signed in to change notification settings - Fork 485
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
[demo app] Notification becomes stale when the app is closed from recented and the notification is in a paused state. #2179
Comments
have you tried using |
But when removing the app from recent, the onTaskRemoved() event itself is not called... |
I believe that is a known issue in Android 14 platform (see #805), but are you sure it's the same on the other devices? I believe the method I mentioned should work on the Android 7 and 13 device |
Yes, I confirm, I check on my real devices with Android 7 and Android 13, the logs above are from the Android 13 device.
On virtual devices Android 13 in AS, this problem can't be reproduce, there the onTaskRemoved event is always called and in pause mode too. |
Interesting, I had no such problems with other platform versions, maybe someone from media3 team knows more about this |
android13.mov |
Hmmm, I don't think the screen cast and the stack trace are related. At least I wouldn't know how. But I may be wrong. Can you take a bug report right after the problem happens? If you're unable to share bug reports or test content publicly, please send them to [email protected] using a subject in the format "Issue #2179". Please also update this issue to indicate you’ve done this. Obviously, we can't fix this when
The snippet above is not sufficient when the service is playing when the app is swipped away. The player needs to be paused first in such a case (docs). The docs suggest to do this:
That's because if the service is in foreground and I acknowledge you are reporting that |
Thanks a lot for your reply! I understand with Android 14, I hope the number of crashes should decrease as the Android 14 version is updated on users devices. I fixed the override in PlaybackService as recommended:
I tested demo-session app again on my Xiaomi Redmi 10 pro (Android 13) device: Reproduction steps
I made a screencast that completely corresponds to the following stack trace:
video2.mov |
Thanks. I don't know this error pattern from other cases.
I'd guess that's the SystemUI from the vendor of that device. These error lines are printed at the moment when we expect The log further misses the log lines that are printed when Do you see this on any other devices than Xiaomi? I'm actually not sure how I can further help with this. I'm sorry to not be able to give you a better answer. |
Thanks, I understand. I'll try to find and test it on other devices, for example, Samsung. I'll let you know if there are similar issues. |
Originally posted by @marcbaechinger in #175
Reproducible in the demo-session app.
To always remove the notification and to see the log, I override
Devices that reproduce the issue
Reproduction steps
Logs in case of pausing:
Logs in the case without pausing:
I recently started programming on Android, maybe I'm doing something wrong, or is this problem still there?
The text was updated successfully, but these errors were encountered: