In my app after user is interact is over device is going to sleep or lock the screen.I want to know in my weather the device is in lock screen or no
2 Answers, 1 is accepted
0
Tina Stancheva
Telerik team
answered on 05 Mar 2015, 03:15 PM
Hello Sanuja,
The Cordova API exposes two events that might be helpful in your case:
pause: the event fires when the native platform puts the application into the background, typically when the user switches to a different application.
resume: the event fires when the native platform pulls the application out from the background.
Other than that I am not aware of a specific set of events you can use to detect exactly when the device is locked or not. However, if you need to prevent the screen from dimming (and locking the device) while the user is not touching the screen but running your app, you can try the Insomnia plugin.