Reputation: 14121
I want my application to run all time. It should execute a function when phone is in sleep mode and stop the execution when it is asleep. Can anyone post a sample code?
Thanks in advance.
Upvotes: 0
Views: 825
Reputation: 15986
I think you need to look into WakeLocks http://developer.android.com/reference/android/os/PowerManager.WakeLock.html
Upvotes: 1