Is it possible to notify an app (inactive OR active but in background) when screen is locked / unlocked?
Something like: https://stackoverflow.com/a/3617552/1011125
Is it possible to notify an app (inactive OR active but in background) when screen is locked / unlocked?
Something like: https://stackoverflow.com/a/3617552/1011125
When the screen is locked, your app gets these delegate messages:
applicationWillResignActive:
applicationDidEnterBackground:
However, you cannot distinguish this situation from any other situation in which you might get those messages (e.g., the user clicked the Home button to suspend your app).