I have implemented my own class, extending the DeviceAdminReceiver, given the app appropriate authorities to run this etc.
I have tried to display a message (as a simple Toast as below, and by starting a new activity) when user has entered wrong PIN, but I cannot get that working. The code executes as intended, but the messages are only showing up until after entering the correct PIN.
Are there any special tricks I need to do, or is this screen simply restricted in Android?
(probably I do not need to run the super.onPasswordFailed()
, but please disregard from that now)
@Override
public void onPasswordFailed(Context context, Intent intent) {
super.onPasswordFailed(context, intent);
Log.i("MYAPP: ", "swDeviceAdminReceiver::onPasswordFailed");
Toast.makeText(context, "Password failed", Toast.LENGTH_SHORT).show();
}