alarmmanager 定期操作未生效
2016-01-14 14:25
288 查看
参看:http://msdx.github.io/androiddoc/docs/reference/android/app/AlarmManager.html
Note: Beginning with API 19 (
alarm delivery is inexact: the OS will shift alarms in order to minimize wakeups and battery use. There are new APIs to support applications which need strict delivery guarantees; see
earlier than API 19 will continue to see the previous behavior in which all alarms are delivered exactly when requested.
原来用的是 set(RTC_WAKEUP..) 没能把手机唤醒。
现在改用
Note: Beginning with API 19 (
KITKAT)
alarm delivery is inexact: the OS will shift alarms in order to minimize wakeups and battery use. There are new APIs to support applications which need strict delivery guarantees; see
setWindow(int, long, long, PendingIntent)and
setExact(int, long, PendingIntent). Applications whose
targetSdkVersionis
earlier than API 19 will continue to see the previous behavior in which all alarms are delivered exactly when requested.
原来用的是 set(RTC_WAKEUP..) 没能把手机唤醒。
现在改用
public void setExact (int type, long triggerAtMillis, PendingIntent operation)
相关文章推荐
- 旺角小吃记
- Java集合类学习笔记
- 明天出发
- OpenCV参考手册之Mat类详解(一)
- VS2010快捷键大全
- H3C交换机常用命令
- js常见问题之为什么点击弹出的i总是最后一个
- 3dmax fx shader, vertex color
- GNU通用公共授权(GPL)(中/英)
- 一条命令解决ubuntu中PDF中文变方…
- 关于盗版和开源的一些牢骚
- 好冷啊,我在南京玩泥巴
- 网络效应,安装基础与微软的阴谋
- 其实Unity界面还是非常可爱的
- Android 5.x Support Library 新特性
- 最奇妙是阴差阳错
- 新电脑安装ubuntu未果
- 新买了I7的笔记本
- 比较值得保存的一份hosts文件
- 将gedit打造成简单的IDE