This is a migrated thread and some comments may be shown as answers.

Lock screen

2 Answers 67 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sanuja
Top achievements
Rank 1
Sanuja asked on 03 Mar 2015, 07:07 AM
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

Sort by
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.

Regards,
Tina Stancheva
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Sanuja
Top achievements
Rank 1
answered on 06 Mar 2015, 06:42 AM
Thank you miss Tina..
Tags
AppBuilder extension for Visual Studio
Asked by
Sanuja
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Sanuja
Top achievements
Rank 1
Share this question
or