Alex Rivera | Logout

How can I detect screen lock/unlock events on the iPhone?

Asked 2011-10-25T11:20:55.457
22

How can I detect screen lock/unlock events on the iPhone? When the user unlocks it, I want to show a notification alert from my iPhone app. (For Just like Broadcast Receiver for screen unlock in Android.)

Edit
Report

1 Answer

1

May be you need to implement following methods in AppDelegate:

Tells the delegate that the application is now in the background.

- (void)applicationDidEnterBackground:(UIApplication *)application

Tells the delegate that the application has become active.

- (void)applicationDidBecomeActive:(UIApplication *)application

Tells the delegate that the application is about to become inactive.

- (void)applicationWillResignActive:(UIApplication *)application
answered 2011-10-25T11:23:50.553

Your Answer