Open revuwa opened 7 years ago
On Android 5.0 and up, setAlarmClock()
is being used. When I implemented this, the documentation said this works around Doze. That being said, I'm afraid I am unable to provide sufficient support for Android 6.0+ because I don't own a device running it. As such, I have never experienced the Doze feature.
It happens to me often that timers ring late, from 5 seconds to more than a minute. Could this be related?
Nexus 6P - Nougat 7.1.2/Copperhead
After facing the DST bug (https://github.com/philliphsu/ClockPlus/issues/15), followed by the snooze bug (https://github.com/philliphsu/ClockPlus/issues/19), I realized one morning (woke up already, looking at my phone), that the alarm - which started in this second - came up round about 20 Minutes after it was set.
I search around a bit and found, that there is 'Doze' since Android 6.0, which sends some background processes to sleep to save energy... So I added ClockPlus to the whitelist over: Settings -> Battery -> three-dot-menu -> Battery optimization -> All apps -> ClockPlus -> don't optimize And since then the reliability of the alarms is back (in my case).
No I saw there is a specific command 'setAlarmclock()' instead of 'set()': https://stackoverflow.com/questions/32492770/how-to-make-alarm-manager-work-when-android-6-0-in-doze-mode#32511496 and I wanted to ask if this could probably help to fix this behaviour without putting the app on the Doze-whitelist on Android devices 6.0+. By the way, I'm using AOSP 7.1.1 (on Samsung I9300).
Thanks in advance for any help or support in that case.