Open GPVSensing opened 4 years ago
@Override public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) { super.onAuthenticationError(errorCode, errString); if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON || errorCode == BiometricPrompt.ERROR_USER_CANCELED) { WritableMap resultMap = new WritableNativeMap(); resultMap.putBoolean("success", false); resultMap.putString("error", "User cancellation"); this.promise.resolve(resultMap); } else { this.promise.reject(errString.toString(), errString.toString()); Can we return errorCode also ?? } }
yes, I've created a PR for that
@Override public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) { super.onAuthenticationError(errorCode, errString); if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON || errorCode == BiometricPrompt.ERROR_USER_CANCELED) { WritableMap resultMap = new WritableNativeMap(); resultMap.putBoolean("success", false); resultMap.putString("error", "User cancellation"); this.promise.resolve(resultMap); } else { this.promise.reject(errString.toString(), errString.toString()); Can we return errorCode also ?? } }