Open insertokname opened 2 days ago
Add the package to the project, and in the main file schedule an exact alarm to run in 1 minute.
Did you configure your project to get EXACT_ALARM
permission as it is required in last Android versions? It is mentioned in the README of the package as well: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/android_alarm_manager_plus#getting-started
https://developer.android.com/about/versions/14/changes/schedule-exact-alarms
Did you configure your project to get
EXACT_ALARM
permission as it is required in last Android versions? It is mentioned in the README of the package as well: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/android_alarm_manager_plus#getting-started https://developer.android.com/about/versions/14/changes/schedule-exact-alarms
Thank you for your response!
Yes i think i have adequately requested the permission.
i have put
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
in my manifest
and used the permission_handler
package to request the permission via Permission.scheduleExactAlarm.request()
Sorry for not mentioning this in the original report!
Platform
Android 14
Plugin
android_alarm_manager_plus
Version
4.0.4
Flutter SDK
3.22.2
Steps to reproduce
Add the package to the project, and in the main file schedule an exact alarm to run in 1 minute. I have also set battery optimizations to unrestricted through android settings.
callbackDispatcher
is a simple function that just logs something. the alarm will not run in exactly 1 minute, and looking at the output ofadb shell dumpsys alarm
I can see a window of 18 hours. Does this mean that the alarm can have an error of up to 18 hours? If so is there any way of working around it?
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean