有什么方法可以让我们了解指纹认证的手指细节吗



我正在开发一个应用程序,我想在该应用程序中添加一些基于指纹登录的限制。

假设我在设备中添加了两个指纹。

1) Left hand index finger 
2) Right hand index finger

有没有什么方法可以让我知道哪根手指被用于身份验证,我的意思是说我是用左手食指或右手食指登录我的应用程序的。

FingerprintManager.AuthenticationResult

有没有办法让我知道哪个手指被用于身份验证

不,对不起。

对不起,您不能注册指纹或访问数据,只能使用以下的代码检查注册

//Check whether the device has a fingerprint sensor//
if (!mFingerprintManager.isHardwareDetected()) {
// If a fingerprint sensor isn’t available, then inform the user that they’ll be unable to use your app’s fingerprint functionality//
textView.setText("Your device doesn't support fingerprint authentication");
}
//Check whether the user has granted your app the USE_FINGERPRINT permission//
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
// If your app doesn't have this permission, then display the following text//
Toast.makeText(EnterPinActivity.this, "Please enable the fingerprint permission", Toast.LENGTH_LONG).show();
}
//Check that the user has registered at least one fingerprint//
if (!mFingerprintManager.hasEnrolledFingerprints()) {
// If the user hasn’t configured any fingerprints, then display the following message//
Toast.makeText(EnterPinActivity.this, "No fingerprint configured. Please register at least one fingerprint in your device's Settings", Toast.LENGTH_LONG).show();
}
//Check that the lockscreen is secured//
if (!mKeyguardManager.isKeyguardSecure()) {
// If the user hasn’t secured their lockscreen with a PIN password or pattern, then display the following text//
Toast.makeText(EnterPinActivity.this, "Please enable lockscreen security in your device's Settings", Toast.LENGTH_LONG).show();
}

最新更新