Lock screen

3 posts, 0 answers
  1. Sanuja
    Sanuja avatar
    12 posts
    Member since:
    Aug 2014

    Posted 03 Mar 2015 Link to this post

    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. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 05 Mar 2015 Link to this post

    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.

     
  3. Sanuja
    Sanuja avatar
    12 posts
    Member since:
    Aug 2014

    Posted 06 Mar 2015 in reply to Tina Stancheva Link to this post

    Thank you miss Tina..
Back to Top