在Android6.0 (Marshmallow)中使用指纹扫描仪时,我遇到了一些奇怪的问题,但我无法弄清楚。
我搜索了所有的东西,但只能看到与硬件缺陷有关的东西。
该应用程序接受、加密、解密和验证指纹很好,但它只允许5次尝试之前,它由于某种原因停止工作。(详见下文)
我已经设置了应用程序,允许用户在实现安全锁定计时器之前进行四次扫描,但是,如果我故意不进行4次身份验证的话。然后我等待锁定时间5分钟,回来我只能扫描我的手指一次,之后指纹似乎停止监听,直到我强制退出应用程序管理器?
然后它又接受指纹。
authenticationFailed回调代码:
@Override
public void onAuthenticationFailed() {
authenticationDialog.dismiss();
cancellationSignal.cancel();
//Add one to the number of attempts taken
attemptCount += 1;
if (attemptCount < maxAttempAllowance) {
AlertDialog.Builder message = new AlertDialog.Builder(appContext);
message.setTitle("Authentication Failed");
message.setMessage("The finger you scanned is not registered in your devices settings or your device failed to identify you.");
message.setPositiveButton("Try Again", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
showAuthenticationDialog();
startAuth(manager, cryptoObject);
}
});
message.setIcon(R.drawable.cross_flat);
message.setCancelable(false);
message.show();
}
else {
AlertDialog.Builder message = new AlertDialog.Builder(appContext);
message.setTitle("Authentication Failed");
message.setMessage("You have exceeded the maximum login attempts allowed. Try again in 5 minutes.");
message.setIcon(R.drawable.cross_flat);
message.setCancelable(false);
message.show();
setSecurityBanTimer();
}
}即使没有锁定安全代码,扫描仪仍然只接受5次打印。
发布于 2016-07-13 06:35:47
我发现API迫使安全性在第五次尝试和进一步尝试之间有30秒的间隔。
这意味着,如果应用程序的安全性设置在4,则在第5次尝试之后,扫描器将没有响应。
Documentation:
具有安全锁定屏幕的设备实现应该包括指纹传感器。如果一个设备实现包括一个指纹传感器,并且为第三方开发人员提供了相应的API,那么它必须在5次错误的指纹验证试验之后,对限制尝试的次数进行至少30秒的评分。
查找信息这里。
https://stackoverflow.com/questions/38343895
复制相似问题