关于类型AlarmManager.RTC

编程入门 行业动态 更新时间:2024-10-09 07:27:40
本文介绍了关于类型AlarmManager.RTC_WAKEUP和AlarmManager.RTC的警报之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是什么类型的报警器之间的差异 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

本文发布于:2023-11-27 09:49:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:类型   AlarmManager   RTC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!