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
精彩评论