Flutter Background Service Crashes detected in Production in Android
Stack trace -
Exception java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4890)
at android.app.ActivityThread.-$$Nest$mhandleReceiver (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2417)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8741)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
Caused by android.app.BackgroundServiceStartNotAllowedException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1981)
at android.app.ContextImpl.startService (ContextImpl.java:1927)
at android.content.ContextWrapper.startService (ContextWrapper.java:834)
at android.content.ContextWrapper.startService (ContextWrapper.java:834)
at id.flutter.flutter_background_service.WatchdogReceiver.onReceive (WatchdogReceiver.java)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4881)
Device
Samsung a51 Android 13
st there a way or any configuration that should fix it ? I found some similar issues in this repo but they had no answers and seemed to be closed. So, I thought to reopen it.
I have the same problem in samsung device
I have the same problem in samsung device
It's better to write your own background service using isolates that will work much better.
Same here, but also in dev mode in android 14 emulator.
I have the same problem in samsung device
It's better to write your own background service using isolates that will work much better.
This isn't really helpful.