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
First step is to get your app the DEVICE_ADMIN privilege by the user.
Write your own class which extends DeviceAdminReceiver. For this you need to import import android.app.admin.DeviceAdminReceiver;
Override the methods in your case something like:
@Override
public void onPasswordFailed(Context context, Intent intent) {
Log.d("Hello", "onPasswordFailed");
}
@Override
public void onPasswordSucceeded(Context context, Intent intent) {
Log.d("Hello", "onPasswordSucceeded");
}