flutter_background_service icon indicating copy to clipboard operation
flutter_background_service copied to clipboard

Flutter Background Service Crashes detected in Production in Android

Open arteevraina opened this issue 2 years ago • 4 comments

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

arteevraina avatar Feb 27 '23 08:02 arteevraina

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.

arteevraina avatar Feb 27 '23 08:02 arteevraina

I have the same problem in samsung device

knight0zh avatar Aug 28 '23 01:08 knight0zh

I have the same problem in samsung device

It's better to write your own background service using isolates that will work much better.

arteevraina avatar Aug 28 '23 06:08 arteevraina

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.

FluffyDiscord avatar Dec 13 '23 13:12 FluffyDiscord