开发者

How to find if a phone is in sleep mode or not???

I want my application to run all time. It should execute a function when开发者_如何学Go phone is in sleep mode and stop the execution when it is asleep. Can anyone post a sample code?

Thanks in advance.


I think you need to look into WakeLocks http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜