开发者

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

开发者 https://www.devze.com 2023-01-16 07:32 出处:网络
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?

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

精彩评论

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

关注公众号