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?
Asked
Active
Viewed 668 times
2

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