You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
I am seeing the following error in adb output on android: "ActivityManager: Attempted to start a foreground service (com.example/com.doublesymmetry.trackplayer.service.MusicService) with a broken notification (no icon: Notification(channel=temporary_channel shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 category=service vis=PRIVATE))"
Steps To Reproduce
Start the example on an android device and look at the adb output
Environment Info:
main branch
testing on a Pixel 3a
* fix(android): foreground issues (close#2045)
- move execution of foregrounding and backgrounding to NotificationState.POSTED in order to avoid race condition where notificationId has not been set yet
- avoid comparing to player states that don’t affect foregrounding, by ignoring LOADING, BUFFERING and READY states – all of which can occur both when playing or while paused
- also avoid the initial IDLE state, since we are only interested when the player would become idle (i.e. all tracks were removed)
- ENDED state should also cause foregrounding to stop (without removing notification)
* Fix: Add missing icon to notification (close#2049)
Using `ExoPlayerR.drawable.exo_notification_small_icon` which is exoplayer’s default notification icon.
Describe the Bug
I am seeing the following error in adb output on android: "ActivityManager: Attempted to start a foreground service (com.example/com.doublesymmetry.trackplayer.service.MusicService) with a broken notification (no icon: Notification(channel=temporary_channel shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 category=service vis=PRIVATE))"
Steps To Reproduce
Start the example on an android device and look at the adb output
Environment Info:
main branch
testing on a Pixel 3a
How I can Help
Looking at the message it seems to be because no icon is provided in the following notification: https://github.com/doublesymmetry/react-native-track-player/blob/main/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt#L114
I will look into fixing this – not sure what to use for an icon though.
The text was updated successfully, but these errors were encountered: