ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

PlayerNotificationListener onNotificationCancelled never called and notification not binding to foregroundService

Open Ivan54321345 opened this issue 3 years ago • 2 comments

ExoPlayer Version

2.18.1

Devices that reproduce the issue

s22+

Devices that do not reproduce the issue

Reproducible in the demo app?

Not tested

Reproduction steps

load one mp3 run app https://github.com/Ivan54321345/bug swipe notification bug

Expected result

binding to foregroundService and onNotificationCancelled called swipe notification or notification cannot be removed

Actual result

PlayerNotificationListener onNotificationCancelled never called and notification not binding to foregroundService

Media

https://github.com/Ivan54321345/bug

Bug Report

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

Ivan54321345 avatar Aug 27 '22 20:08 Ivan54321345

This issue is not really actionable for us I'm afraid.

The behaviour of Android regarding the notification is for instance very much depending on the API level. In higher API levels dismissing the notification does not remove the notification and hence it does never call onNotificaitionCancelled.

It's also unclear to me why you expect and what it means to bind the notitification to foregroundService. Looking into your app it seems to me that onNotificationPosted would start the service into the foreground, but this seems unrelated to dismissing the notification and waiting for onNotificationCancelled.

For me this is currently an application issue. If you disagree, can you please narrow down your bug report a bit and tell us which expectations the library does not meet?

As an aside: It may be worth looking into the Media3 session module. It provides you with a MediaLibraryService that solves many of the problems you are currently trying to solve. There is also some documentation on DAC around this.

marcbaechinger avatar Aug 31 '22 10:08 marcbaechinger

Hey @Ivan54321345. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 20 '22 01:09 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@Ivan54321345 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Sep 29 '22 01:09 google-oss-bot