How can I detect if the phone is locked by a password, pin or pattern?

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

i need to check which perticuler type of lock is exist in device , Pin type or something more secure (Password, Fingerprint type etc.). I am able to check if there is a Pin, Password or a Pattern.
I have used
KeyguardManager keyguardManager = (KeyguardManager) this.getSystemService(Context.KEYGUARD_SERVICE); //api 23+
return keyguardManager.isDeviceSecure();

it retruns only true or false(if any type password exist or not).
 

belodion

Co-Ambassador Team Lead
Moderator
Jun 10, 2014
39,387
251
83
Visit site
Do you not think that you ought to tell us why you need to know that if you expect us to answer?
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
If it's your phone, use your memory. If it's not your phone, we don't discuss hacking here. (If it's the phone of a deceased loved one, you have my sympathy, but we still don't discuss that here.)
 

ManiacJoe

Trusted Member
Aug 5, 2015
6,326
3
38
Visit site
Seems like a reasonable programming question.
The question just needs to be moved to one of the developer forums.
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
165,581
4,724
113
Visit site
Good idea, I moved this to the Developers Lounge. As long as there is no discussion about hacking into a phone, have at it!:)
 

Trending Posts

Forum statistics

Threads
943,112
Messages
6,917,339
Members
3,158,828
Latest member
DragnDon