开发者

Does PowerManager.PARTIAL_WAKE_LOCK have timeout?

I just use PowerManager.PARTIAL_WAKE_LOCK to let my app still run when users press the power button. My app need to use wifi sensor sometimes so I need to continually register Receiver for wifi sensor and startscan wifimanager, but I find that when system work for a period of time (about 1-2 hours), it seem register Receiver or startscan do not work开发者_如何学运维 successfully. Does anybody have some ideas what's the problem of it or does PowerManager.PARTIAL_WAKE_LOCK have timeout that cause it not work? If does, how to set it?

BTW, is DEIVCE_POWER permission useful to PowerManager or to my app? Can anybody tell me what is it used for?

Thanks a lot!!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜