Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App and Pattern Lock Screen

Tags:

android

I am currently developing an app for android 2.2 or above.

I want to allow the user to enable a login before having access to the app. I want to allow the user to choose between various types of login like password, pin or pattern.

I was wondering if would be possible to add a pattern lock to my own app. Is there a plugin I can use to create one or use android's pattern lock for my own app. I only want this for the app I don't want it to change how the actual device is locked.

Thanks for any help you can provide.

like image 562
Boardy Avatar asked Mar 02 '11 19:03

Boardy


People also ask

How can I pattern Lock my Android app?

Go to Settings and select “Biometrics and security.” Tap on “Secure Folder,” then “Lock type.” Choose between Pattern, PIN, Password or a biometric option like fingerprint or iris, and create that password. Go to your app drawer and tap “Secure Folder.” Tap “Add apps.”

How do I Lock an app with a pattern?

Select Pattern, Pin, or Password (or a biometric option, if available), then continue by entering your selection and confirming it. Select Secure Folder from the app drawer, then tap Add apps. Select the apps you wish to include in Secure Folder, then tap Add. Select Lock and exit in the upper-right corner.

How do you unlock an app if you forgot the pattern?

option is displayed at the bottom of the app lock screen, touch Forgot password? to enter the answer to the security question and reset the password. If there is no Forgot password? option, enter the lock screen password.


2 Answers

I dont think there is a widget for this. I would create a matrix of images 3x3 give them each a listener and keep track of the order the user presses them. Then take the order, 2,3,6,5,8 for example, save them as a string "23658" this is the password! hash and save that somewhere. whenever a user inputs the button order compare the input hash to the saved one.

like image 75
Wayner Avatar answered Oct 07 '22 07:10

Wayner


If any body is still searching for the answer, I found this library which is pretty useful and much better than the android-lockpattern, hosted on GitHub

like image 22
RmK Avatar answered Oct 07 '22 07:10

RmK