我知道这个问题已经被问过,here,但给出的答案是指文件实际上是令人难以置信的暧昧。它说不精确报警可能出现在指定的时间后,几乎是满间隔。对于有一整天的时间间隔报警,这似乎过分了。
I know this question has been asked before, here, but the answer given refers to documentation which is actually incredibly ambiguous. It says the inexact alarm might occur almost a "full interval" after the specified time. For alarms with an interval of a whole day, this would seem excessive.
文档不说这里(RTC示例下)您可以使用不精确重复日常报警,并给出了一个精确闹钟被设置为大约下午2的一个例子。没有人在他们的脑子会想大约下午2可能意味着下午1点,第二天,所以它似乎并不可能每天的报警至少可以几乎整整间隔指定的时间后。
The documentation does say here (under "RTC examples") that you can use inexact repeating for daily alarms, and gives an example of an inexact alarm being set for "approximately 2pm". Nobody in their right mind would think "approximately 2pm" might mean 1pm the next day, so it doesn't seem likely daily alarms at least can be "almost a full interval" after the specified time.
是否有任何明确的信息在那里大约有多么晚每日间隔不精确的警报可能是什么?谢谢你。
Is there any definite info out there about just how late an inexact alarm with a daily interval might be? Thanks.
(我知道API 19具有setWindow但我想我的应用程序在旧的API的工作太)。
(I know API 19 has "setWindow" but I'd like my app to work on older APIs too).
推荐答案我已经连续5报警和平均延迟测试这一点,我的手机上,为11.8分钟。这与设置为INTERVAL_DAY重复之间的间隔。
I've tested this with 5 consecutive alarms and the average delay, on my phone, was 11.8 minutes. This was with the interval between repeats set to INTERVAL_DAY.
更多推荐
究竟是不精确setInexactRepeating()为AlarmManager?
发布评论