zoukankan      html  css  js  c++  java
  • android AlarmManager

    参考java代码可以更好的理解:

    1、public  static   final  int  ELAPSED_REALTIME  

    当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是相对时间,是从系统启动后开始计时的,包括睡眠时间,可以通过调用SystemClock.elapsedRealtime()获得。系统值是3    (0x00000003)。    

    2、 public   static   final   int  ELAPSED_REALTIME_WAKEUP  

    能唤醒系统,用法同ELAPSED_REALTIME,系统值是2 (0x00000002) 。   

    3、public  static   final  int  RTC  

    当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是绝对时间,所用时间是UTC时间,可以通过调用 System.currentTimeMillis()获得。系统值是1 (0x00000001) 。  

    4、public   static   final   int  RTC_WAKEUP  

    能唤醒系统,用法同RTC类型,系统值为 0 (0x00000000) 。  

    5、Public static   final   int  POWER_OFF_WAKEUP  

    能唤醒系统,它是一种关机闹铃,就是说设备在关机状态下也可以唤醒系统,所以我们把它称之为关机闹铃。使用方法同RTC类型,系统值为4(0x00000004)。

  • 相关阅读:
    BUG记录
    .Net HTTP请求的发送方式与分析
    初始token
    VS2017开发安卓应用(Xamarin)
    路由模板和路由特性
    使用signalR创建聊天室。
    C# SessionHelper
    postgres递归查询所有子部门
    centos7备份postgres
    Centos7挂载硬盘
  • 原文地址:https://www.cnblogs.com/littlezan/p/3527430.html
Copyright © 2011-2022 走看看