0

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.

Nikolai Samteladze
  • 7,699
  • 6
  • 44
  • 70
James
  • 13,891
  • 26
  • 68
  • 93

1 Answers1

1

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

hunterp
  • 15,716
  • 18
  • 63
  • 115