gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

Bug android AndroidAlarm.stop android 13/14 #141

Closed wayupdev closed 9 months ago

wayupdev commented 10 months ago

Alarm plugin version 3.0.5

Describe the bug Issue sur crashlytics

To Reproduce I couldn't reproduce it

Expected behavior Work fine

Screenshots

image image image

Device info Provide device info (Manufacturer, OS version, ...) Ex: iPhone 13 Pro, iOS 16.2, ...

Additional context AndroidAlarm.stop io.flutter.plugins.firebase.crashlytics.FlutterError - PlatformException(error, Not allowed to start service Intent { act=STOP_ALARM cmp=com.gdelataillade.alarm.alarm.AlarmService (has extras) }: app is in background uid UidRecord{180ce25 u0a593 TPSL idle change:cached|procstate procs:0 seq(22

package:alarm/src/android_alarm.dart:77

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError PlatformException(error, Not allowed to start service Intent { act=STOP_ALARM cmp=com.gdelataillade.alarm.alarm.AlarmService (has extras) }: app is in background uid UidRecord{85c1e75 u0a422 TPSL idle change:cached|procstate procs:0 seq(14200743,14200327)}, null, android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=STOP_ALARM cmp=com.gdelataillade.alarm.alarm.AlarmService (has extras) }: app is in background uid UidRecord{85c1e75 u0a422 TPSL idle change:cached|procstate procs:0 seq(14200743,14200327)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1918) at android.app.ContextImpl.startService(ContextImpl.java:1874) at android.content.ContextWrapper.startService(ContextWrapper.java:827) at com.gdelataillade.alarm.alarm.a.onMethodCall(Unknown Source:75) at z9.k$a.a(Unknown Source:17) at n9.c.l(Unknown Source:18) at n9.c.m(Unknown Source:40) at n9.c.i(Unknown Source:0) at n9.b.run(Unknown Source:12) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:211) at android.os.Looper.loop(Looper.java:300) at android.app.ActivityThread.main(ActivityThread.java:8296) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954) )

aykutuludag commented 9 months ago

I can verify that this issue has been fixed.

gdelataillade commented 9 months ago

@aykutuludag

Awesome, I'm closing the issue then