2

I have an application which runs in background mode. And when the Lock Screen is active I need to perform some code. How do I detect when the lock screen is active from my background app?

Damon
  • 3,004
  • 7
  • 24
  • 28
LightNight
  • 1,616
  • 6
  • 30
  • 59
  • What kind of background app is it? Only gps turn-by-turn apps actually _run_ in the background, all other types are periodically woken up by the OS. – Johannes Fahrenkrug Oct 18 '11 at 13:02
  • I don't think this is possible. There are ways to prevent the device from locking automatically, but you cannot detect and run code when the device is locked. – Jack Humphries Oct 18 '11 at 13:05

1 Answers1

4

You can't do this unless you are writing code for a Jailbroken device.

Simon Lee
  • 22,304
  • 4
  • 41
  • 45