-
-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: exact android alarm has 18 hour window of error #3262
Comments
Did you configure your project to get |
Thank you for your response! Yes i think i have adequately requested the permission. i have put
in my manifest and used the Sorry for not mentioning this in the original report! |
@miquelbeltran Could it have something to do with this?
|
Sorry, no clue. There are a couple of old tickets mentioning this is an issue with periodic alarms e.g. #323 and #487 My only idea for you would be to implement a simple Android (native) that schedules an alarm and see if you encounter the same issue as with the plugin. It could be that the plugin is misusing a parameter, but I have no idea. If you could provide a working Android (kotlin or java) example, we can then compare with the plugin code. |
Hello sorry for the late response i couldn't try out a few solutions until now. Before i get to writing kotlin i just want to make sure that this "recursive initialization" pattern wouldn't be an option:
This looks like it's working, running the alarm at a regular 1 minute interval, with exact scheduling, while the screen is off. Although i get this warning:
Also i know there is a small delay increase in the interval:
There is a small increase from |
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 of
adb 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
The text was updated successfully, but these errors were encountered: