Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send a new event if the user closes the prompt #454

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Fingerprint.loadBiometricSecret({
- **BIOMETRIC_LOCKED_OUT** = `-111`;
- **BIOMETRIC_LOCKED_OUT_PERMANENT** = `-112`;
- **BIOMETRIC_SECRET_NOT_FOUND** = `-113`;
- **BIOMETRIC_USER_CANCELED** = `-114`;
***

Thanks to the authors of the original fingerprint plugins
Expand Down
2 changes: 2 additions & 0 deletions src/android/BiometricActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ private void onError(int errorCode, @NonNull CharSequence errString) {
switch (errorCode)
{
case BiometricPrompt.ERROR_USER_CANCELED:
finishWithError(PluginError.BIOMETRIC_USER_CANCELED);
return;
case BiometricPrompt.ERROR_CANCELED:
finishWithError(PluginError.BIOMETRIC_DISMISSED);
return;
Expand Down
1 change: 1 addition & 0 deletions src/android/PluginError.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public enum PluginError {
BIOMETRIC_LOCKED_OUT(-111),
BIOMETRIC_LOCKED_OUT_PERMANENT(-112),
BIOMETRIC_NO_SECRET_FOUND(-113),
BIOMETRIC_USER_CANCELED(-114),
BIOMETRIC_ARGS_PARSING_FAILED(-115);

private int value;
Expand Down