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

alarm set alarmSettings #118

Closed shokhrukhyusupov closed 9 months ago

shokhrukhyusupov commented 11 months ago

Exception has occurred. AlarmException (nativeAndroidAlarm error: PlatformException(error, com.example.alarm: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles., null, java.lang.IllegalArgumentException: com.example.alarm: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:401) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:671) at android.app.PendingIntent.getBroadcast(PendingIntent.java:658) at com.gdelataillade.alarm.alarm.AlarmPlugin.handleDelayedAlarm(AlarmPlugin.kt:128) at com.gdelataillade.alarm.alarm.AlarmPlugin.onMethodCall(AlarmPlugin.kt:48) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.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:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8136) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) ))

gdelataillade commented 11 months ago

Hi @shokhrukhyusupov

Thanks for your feedback.

I pretty sure I fixed this issue yesterday in release 3.0.0-dev.6. Please update the plugin and let me know if you still have your issue.

gdelataillade commented 11 months ago

Hi @shokhrukhyusupov

I just released version 3.0.0. Let me know if it fixes your issue.