私のコードでは、最大試行回数を超えて認証に失敗した場合、メインページにユーザーを誘導するだけです。認証ページにアクセスし、認証ページが正常に認証されるまで試行を続けます。だからここ最大の試行回数を超えた場合に機能/ボタンをブロックする
public void onAuthenticationFailed() {
//Add one to the number of attempts taken
attemptCount += 1;
if (attemptCount < maxAttemptAllowance) {
super.onAuthenticationFailed();
Toast.makeText(context, "Fingerprint Authentication Failed, Please Try Again", Toast.LENGTH_SHORT).show();
} else {
//here is where the system block user if they exceed the maximum attempts
Toast.makeText(context, "Exceed maximum attempts, try again in 5 minutes later", Toast.LENGTH_SHORT).show();
context.startActivity((new Intent(context, Main.class)));
}
}
は、私は、ユーザーが最大の試行を超えた場合に5分間の機能ではなく、システム全体を無効に/制限/遮断する可能性がとにかくです、私の質問です。
事前に感謝を私が本当に現在の時刻とともにSharedPreferenceで、この問題の考え方/ロジック