I am building a security app and I need to know if the user is giving incorrect password . Suppose user phone is locked by pattern lock system , and unfortunately user has f
You can set up a DeviceAdminReceiver that will be notified about failed password attempts, as well as a successful password attempt that occurred after a failed attempt. This is covered in the documentation of Android's device administration APIs.
Note that the user will have to agree to allow your app to serve as a device administrator, via the Settings app, before you will get these events.
This sample project demonstrates listening for those events, plus setting up a password quality policy. The key pieces are: