Naresh J Naresh J - 7 months ago 169
Android Question

Change PIN programmatically

In android device, we can have three types of lock as Pattern, PIN and password.

In my application, I want to change/reset the PIN pro-grammatically.

I am accepting 4-digits from user which will be set as a new PIN for that device.

Is it possible to reset this PIN or is it against the android security policy?

Thank You.


You can do it by using Device Admin API. Where android gives you facility to make your own logic for Password (even more..). Read about how to implement password policy.

Note: You can get the sample code at <sdk>/samples/android-<version>/. The <version> number corresponds to the platform's API level.