ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

PlayerNotificationManager creted 2 notifications after restart device

Open ivan12312312 opened this issue 3 years ago • 2 comments

ExoPlayer Version

2.18.1

Devices that reproduce the issue

sumsung s22+ android 12

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

build this app https://github.com/ivan12312312/test grand permisions start app play any music in app restart app after restart device viewed 2 notificationis(bug)

Expected result

view one notification or not view notication

Actual result

after restart device viewed 2 notificationis

Media

1 notification 2 notification

Bug Report

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

ivan12312312 avatar Sep 11 '22 16:09 ivan12312312

On Android 13, It does crash the app.

android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=AN Me...

xeinebiu avatar Sep 13 '22 11:09 xeinebiu

On Android 13, It does crash the app.

android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=AN Me...

I found out that, now we need to register/create a notification channel manually instead of using the notification from ExoPlayer to start the service.

xeinebiu avatar Sep 13 '22 16:09 xeinebiu