diff --git a/android/src/main/java/com/hieuvp/fingerprint/ReactNativeFingerprintScannerModule.java b/android/src/main/java/com/hieuvp/fingerprint/ReactNativeFingerprintScannerModule.java index fd3a6f6c..bd977a7f 100644 --- a/android/src/main/java/com/hieuvp/fingerprint/ReactNativeFingerprintScannerModule.java +++ b/android/src/main/java/com/hieuvp/fingerprint/ReactNativeFingerprintScannerModule.java @@ -83,12 +83,14 @@ public AuthCallback(final Promise promise) { @Override public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) { + biometricPrompt = null; super.onAuthenticationError(errorCode, errString); this.promise.reject(biometricPromptErrName(errorCode), TYPE_BIOMETRICS); } @Override public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) { + biometricPrompt = null; super.onAuthenticationSucceeded(result); this.promise.resolve(true); }