flutter_background_service icon indicating copy to clipboard operation
flutter_background_service copied to clipboard

Watchdog crash on Android

Open Wackymax opened this issue 3 years ago • 5 comments

Hi,

Would it be possible to only receive watchdog events when the background service is registered and started up? It looks like the watchdog receiver triggers even if we don't need the background functionality leading to application crashes.

image

Wackymax avatar Sep 25 '22 07:09 Wackymax

Hi, any ideas on why this might be happening or what I can do to prevent these errors? I'd rather the service exit gracefully in these cases instead of having the application process crash.

Wackymax avatar Sep 27 '22 06:09 Wackymax

I think here is the similar issue https://stackoverflow.com/questions/69604951/getting-android-app-foregroundservicestartnotallowedexception-in-android-12-sdk

ekasetiawans avatar Sep 27 '22 06:09 ekasetiawans

I'd updated the alarm manager used by WatchdogReceiver to setExact, could you try it @Wackymax ?

ekasetiawans avatar Sep 27 '22 06:09 ekasetiawans

getting the same error sometimes. i am using version ^2.4.5

razfazz avatar Oct 28 '22 07:10 razfazz

Any fix for this?

carman247 avatar Apr 06 '23 08:04 carman247