Reputation: 14101
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: 823
Reputation: 15976
I think you need to look into WakeLocks http://developer.android.com/reference/android/os/PowerManager.WakeLock.html
Upvotes: 1