Reputation: 1215
I work with biometric fingerprint Android. When we register a fingerprint at settings, we also store the name of a fingerprint. My question is, is it possible we get the name of the fingerprint? I have code just authentication fingerprint, but I need name of the fingerprint. Thank you for help.
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();
}
Upvotes: 0
Views: 332
Reputation: 1006654
When we register a fingerprint at settings, we also store the name of a fingerprint
Not necessarily.
is it possible we get the name of the fingerprint?
No, sorry.
Upvotes: 1