Reputation: 99
Hi friend's i am new in Android
how to check if a passcode or screenlock is set in Android.
Is there any public API to figure this out. MY current application stores some secure data so it's important to know from the business logic of the application.please suggest me something. Thanks in Advance.
Upvotes: 0
Views: 310
Reputation: 1854
You could try something like this:
int patternsetting = android.provider.Settings.System.getInt(getContentResolver(), android.provider.Settings.System.LOCK_PATTERN_ENABLED);
0 means has No pattern, 1 means has pattern.
http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCK_PATTERN_ENABLED
Upvotes: 1