ExoPlayer
ExoPlayer copied to clipboard
PlayerNotificationListener onNotificationCancelled never called and notification not binding to foregroundService
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 bugreportto [email protected] after filing this issue.
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.
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!
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.