博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AlarmManager 的唤醒类型
阅读量:4147 次
发布时间:2019-05-25

本文共 1631 字,大约阅读时间需要 5 分钟。

AlarmManager 的唤醒类型

AlarmManager.RTC,硬件闹钟,不唤醒手机(也可能是其它设备)休眠;当手机休眠时不发射闹钟。AlarmManager.RTC_WAKEUP,硬件闹钟,当闹钟发躰时唤醒手机休眠;AlarmManager.ELAPSED_REALTIME,真实时间流逝闹钟,不唤醒手机休眠;当手机休眠时不发射闹钟。AlarmManager.ELAPSED_REALTIME_WAKEUP,真实时间流逝闹钟,当闹钟发躰时唤醒手机休眠;

具体源码

xref: /frameworks/base/core/java/android/app/AlarmManager.java

83public class AlarmManager {84    private static final String TAG = "AlarmManager";8586    /**87     * Alarm time in {@link System#currentTimeMillis System.currentTimeMillis()}88     * (wall clock time in UTC), which will wake up the device when89     * it goes off.90     */91    public static final int RTC_WAKEUP = 0;92    /**93     * Alarm time in {@link System#currentTimeMillis System.currentTimeMillis()}94     * (wall clock time in UTC).  This alarm does not wake the95     * device up; if it goes off while the device is asleep, it will not be96     * delivered until the next time the device wakes up.97     */98    public static final int RTC = 1;99    /**100     * Alarm time in {@link android.os.SystemClock#elapsedRealtime101     * SystemClock.elapsedRealtime()} (time since boot, including sleep),102     * which will wake up the device when it goes off.103     */104    public static final int ELAPSED_REALTIME_WAKEUP = 2;105    /**106     * Alarm time in {@link android.os.SystemClock#elapsedRealtime107     * SystemClock.elapsedRealtime()} (time since boot, including sleep).108     * This alarm does not wake the device up; if it goes off while the device109     * is asleep, it will not be delivered until the next time the device110     * wakes up.111     */112    public static final int ELAPSED_REALTIME = 3

转载地址:http://wacti.baihongyu.com/

你可能感兴趣的文章
Mysql复制表以及复制数据库
查看>>
Linux分区方案
查看>>
如何使用 systemd 中的定时器
查看>>
git命令速查表
查看>>
linux进程监控和自动重启的简单实现
查看>>
OpenFeign学习(三):OpenFeign配置生成代理对象
查看>>
OpenFeign学习(四):OpenFeign的方法同步请求执行
查看>>
OpenFeign学习(六):OpenFign进行表单提交参数或传输文件
查看>>
Ribbon 学习(二):Spring Cloud Ribbon 加载配置原理
查看>>
Ribbon 学习(三):RestTemplate 请求负载流程解析
查看>>
深入理解HashMap
查看>>
XML生成(一):DOM生成XML
查看>>
XML生成(三):JDOM生成
查看>>
Ubuntu Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied)
查看>>
collect2: ld returned 1 exit status
查看>>
C#入门
查看>>
C#中ColorDialog需点两次确定才会退出的问题
查看>>
数据库
查看>>
nginx反代 499 502 bad gateway 和timeout
查看>>
linux虚拟机安装tar.gz版jdk步骤详解
查看>>