flutter_background_service
flutter_background_service copied to clipboard
when I used a flutter_background_service plugin in my app. Crashed App when installing an app on a Samsung device.
when I used a flutter_background_service plugin in my app. Crashed App when installing an app on a Samsung device. V/BackgroundService( 4930): Starting flutter engine for background service I/AndroidAlarmManagerPlugin( 4930): onAttachedToEngine D/BackgroundServicePlugin( 4930): onAttachedToService D/AndroidRuntime( 4930): Shutting down VM E/AndroidRuntime( 4930): FATAL EXCEPTION: main E/AndroidRuntime( 4930): android.app.RemoteServiceException: Bad notification for startForeground E/AndroidRuntime( 4930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1774) E/AndroidRuntime( 4930): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime( 4930): at android.os.Looper.loop(Looper.java:164) E/AndroidRuntime( 4930): at android.app.ActivityThread.main(ActivityThread.java:6543) E/AndroidRuntime( 4930): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4930): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440) E/AndroidRuntime( 4930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
Did you provide proper configuration for notification? It says something is wrong about notification
We configured channel this way and works fine
notificationChannelId: 'my_foreground', initialNotificationTitle: 'any_title_you_want', initialNotificationContent: 'Initializing', foregroundServiceNotificationId: some_int_value,
Facing a similar problem, even though I used the example app.
Same crash here,
When I comment "notificationChannelId" params it works but the "stopSelf()" cannot remove the notification foreground.
Test device : Samsung Galaxy Note8 (Android 9)
Same crash here,
SM F936U1 (mobile) • RFCTA0BR6DM • android-arm64 • Android 13 (API 33)