我知道设置 RTC_WAKEUP 将运行,即使手机处于睡眠。但我想知道什么时候手机是睡着了,就应在睡眠时间触发的 RTC 报警延迟到时候手机唤醒?
I know to set RTC_WAKEUP would run even if phone is sleep. But I want to know when the phone is asleep, would the RTC alarm which should be triggered in the sleeping time be delayed to when the phone wake up?
推荐答案从官方文档的这里:
报警时间 System.currentTimeMillis的()(挂钟 UTC时间)。该报警没有醒来 该设备了;如果它熄灭,而 该装置是睡着了,它不会 输送的直到下一次 设备醒来。
Alarm time in System.currentTimeMillis() (wall clock time in UTC). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.
所以回答你的问题:是的,这将被推迟,并不会被删除。
So answer to your question: yes, it will be delayed and will not be dropped.
更多推荐
AlarmManager,当手机是睡着了报警不叫
发布评论