本文介绍了服务和唤醒锁定策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
正如AlarmManager文档中阐明的:
的
From what I've seen and read here:http://www.androidguys.com/2009/04/02/wake-up-with-the-alarm/https://github.com/commonsguy/cw-advandroid/blob/master/SystemServices/Alarm/src/com/commonsware/android/syssvc/alarm/WakefulIntentService.java
That guys holds onto the wake lock through the service not just until it becomes available. So my question is, will a service allow the CPU to sleep if it does not have a wake policy running through the service?
解决方案
Of course. Think of a laptop that sleeps when one closes its lid (the silly default). Some method somewhere will be interrupted - be it the main() method of the currently running application
这篇关于服务和唤醒锁定策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!