http://developer.android.com/reference/android/app/AlarmManager.html

The Alarm Manager holds a CPU wake lock as long as the alarm receiver's onReceive() method is executing. This guarantees that the phone will not sleep until you have finished handling the broadcast. Once onReceive() returns, the Alarm Manager releases this wake lock. This means that the phone will in some cases sleep as soon as your onReceive() method completes.

If your alarm receiver calledContext.startService(), it is possible that the phone will sleep before the requested service is launched. To prevent this, your BroadcastReceiver and Service will need to implement a separate wake lock policy to ensure that the phone continues running until the service becomes available.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android 系统默认音量和最大音量
  2. Android完全退出程序、线程
  3. Android开发错误——Android Studio中遇
  4. android 教程(2)
  5. android 拨号上网流程
  6. Android(安卓)7.0 安装包修改后无法安装
  7. android 全屏问题
  8. view的隐藏和显示
  9. 2011.10.11——— android GestureDetect
  10. Toast大全(默认,顶部,底部,各种自定义) A