Programming for android: How to check that screen lock has a password? on newest questions tagged android – Stack Overflow

I’m currently checking if there is a screen lock password with:

DevicePolicyManager.getgetPasswordMinimumLength() != 0

so if I see that the length is 0 I conclude there is no screen lock password and I prompt user to set one with DevicePolicyManager.ACTION_SET_NEW_PASSWORD.

I wonder though if it’s a correct method of checking whether a screen lock password has been set?

See Answers


source: http://stackoverflow.com/questions/11736713/how-to-check-that-screen-lock-has-a-password
Programming for android: programming-for-android



online applications demo