Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Robson_R_
Beginner
304 Views

How to force the screen lock (to force the user to unlock when required)

Jump to solution

In my application, after the user do some activities, I want to be able to LOCK the device screen, I mean, protected the device with the key (PIN or pattern) already defined by the user in IOS/Android/WP8. So the user must unlock keying the key to return to the application.

I couldn´t find any plugin to do this until now. Please let me know.

If there is no prlugin for this, how can I suggest to the Cordova developers to create one?

Tags (2)
0 Kudos
1 Solution
Anusha_M_Intel1
Employee
304 Views

Just to clarify, you want them to key in a password set earlier in the app? Or you want to call the native phone screen unlock functionality from your app? 

If you want to use a password - you can look into the App Security API. If you want to call the native phone lock function this might work for you, https://github.com/kitolog/cordova-plugin-screen-locker

View solution in original post

3 Replies
Anusha_M_Intel1
Employee
305 Views

Just to clarify, you want them to key in a password set earlier in the app? Or you want to call the native phone screen unlock functionality from your app? 

If you want to use a password - you can look into the App Security API. If you want to call the native phone lock function this might work for you, https://github.com/kitolog/cordova-plugin-screen-locker

View solution in original post

Robson_R_
Beginner
304 Views

Anusha, first of all many thanks for the reply and suggestions. In fact I am looking for a functionality similar to the cordova-plugin-screen-locker you have mentioned. Unfortunately based on its documentation, it only works on Android, and I need for Android/IOS/WP8. Besides this, it looks like the plugin project is abandoned, no recent version.

Anyway, many thanks for the reply.

Regards

Robson Reis

Amrita_C_Intel
Employee
304 Views

Hi Robson,

I tried to search any passcode plugin which will work for all the three platforms which you mentioned. But according to my research you need to include three different plugins for the three different platforms.

For iOS- https://github.com/EddyVerbruggen/cordova-plugin-touch-id

For Android as Anusha specified

Not sure about the windows.

Reply