我使用生物识别指纹Android。当我们在设置中注册指纹时,我们还会存储指纹的名称。我的问题是,我们有可能得到指纹的名称吗?我有代码只是身份验证指纹,但我需要指纹的名称。谢谢你的帮助。
biometricPrompt = new BiometricPrompt(activity, executor, new BiometricPrompt.AuthenticationCallback() {
@Override
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON) {
// user clicked negative button
if (dialogMessage!=null && dialogMessage.isShowing()) {
// Dismiss dialog
dialogMessage.dismiss();
stopHandler();
}
} else {
// Called when an unrecoverable error has been encountered and the operation is complete.
displayToastMessage("text", "", R.string.unrecoverable_error_has_been_encountered);
}
}
@Override
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
// Sent data to server
showDialogBiometric();
}
@Override
public void onAuthenticationFailed() {
super.onAuthenticationFailed();
// Called when a biometric is valid but not recognized.
displayToastMessage("text", "", R.string.valid_biometric_not_recognized);
}
});
promptInfo = new BiometricPrompt.PromptInfo.Builder()
.setTitle(getString(R.string.attendance))
.setDescription(getString(R.string.absent_with_fingerprint))
.setNegativeButtonText(getString(R.string.cancel))
.build();
}
当我们在设置中注册指纹时,我们还会存储指纹的名称
不一定。
我们有可能得到指纹的名称吗?
不,对不起。