是什么类型的报警器之间的差异 RTC_WAKEUP 和 RTC
What is the difference between the alarms of type of RTC_WAKEUP and RTC?
从的documenatation的 AlarmManager ,似乎 RTC 将不可以唤醒如果设备当前处于睡眠状态,不会交付的设备醒来,直到下一次设备。但我发现,键入 RTC 仍将唤醒设备的报警,所以这是怎么回事?
From the documenatation of the AlarmManager, it seems that alarms of RTC will not wake up the device if the device current is asleep, and will not delivered until the next time the device wakes up. But I found that the alarm of type of RTC will still wake up the device, so what's going on?
我所做的就是把 RTC_WAKEUP 的类型更改为 RTC 在 AlamrManagerService的.java ,功能 setRepeating(),然后设置为3分钟,从现在开始报警,然后检查设备,你会发现它还可以通过报警来唤醒。
What I did is to change the type of RTC_WAKEUP to RTC in the AlamrManagerService.java, function setRepeating(), and then set an alarm of 3 minutes from now on, then check the device, you will find that it still could be waken up by the alarm.
推荐答案有其他情况的报告AlarmManager.RTC似乎唤醒设备:
THere are other instances reporting AlarmManager.RTC seems to wake up the device:
- AlarmManager.RTC唤醒做太多更新
- Android AlarmManager RTC ,而设备是睡觉不会暂停
- Allowing手机在使用Android上 RTC 报警睡觉
- AlarmManager.RTC doing too many updates on wakeup
- Android AlarmManager RTC doesn't pause while device is sleeping
- Allowing the phone to sleep while using RTC alarm on Android
每一次,根本原因是一样的:
Each time, the root cause is the same:
东西保持清醒的设备(即使屏幕是黑的)。结果不要忘了充电设备(连接到电源)没有睡觉。
Something keeps the device awake (even though the screen is black). Don't forget that a charging device (connected to power) isn't sleeping.
更多推荐
关于类型AlarmManager.RTC
发布评论