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 4 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: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-fingerprint-aio",
"version": "5.0.1",
"version": "5.1.0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "5.1.0",
"version": "5.0.1",

Please don't change versions in PRs. It's part of the release process.

"description": "Cordova plugin to use fingerprint authentication on Android and iOS",
"cordova": {
"id": "cordova-plugin-fingerprint-aio",
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