diff --git a/package.json b/package.json index b6c81840..7d888ce3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "test-travis": "npm run test-ios", "test-appveyor": "npm run test-browser", "test-local": "npm run test-browser && npm run test-android && npm run test-ios", - "test-android": "npx cordova-paramedic --platform android@8.1.0 --plugin $(pwd)", + "test-android": "npx cordova-paramedic --platform android --plugin $(pwd)", "test-ios": "npx cordova-paramedic --platform ios --plugin $(pwd) --verbose", "test-windows": "npx cordova-paramedic --platform windows --plugin $(pwd)", "test-browser": "npx cordova-paramedic --platform browser --plugin $(pwd)", diff --git a/src/android/BiometricActivity.java b/src/android/BiometricActivity.java index 768d7f02..654e0fbe 100644 --- a/src/android/BiometricActivity.java +++ b/src/android/BiometricActivity.java @@ -117,6 +117,7 @@ private void onError(int errorCode, @NonNull CharSequence errString) { switch (errorCode) { + case BiometricPrompt.ERROR_USER_CANCELED: case BiometricPrompt.ERROR_CANCELED: finishWithError(PluginError.BIOMETRIC_FINGERPRINT_DISMISSED); return; diff --git a/src/android/build.gradle b/src/android/build.gradle index dcb74b2c..e6b485f7 100644 --- a/src/android/build.gradle +++ b/src/android/build.gradle @@ -1,5 +1,15 @@ dependencies { + + /** + * The android-biometric.aar file has been taken from com.github.exxbrain:android-biometric library. + * Android biometric library is a clone of androidx.biometric library adapted for non-androidx apps. + * This project could be found at https://github.com/exxbrain/android-biometric. + * It has Apache License 2.0. + * + * TODO: Temporary solution. Should be removed after moving cordova-android to androidx. Then use androidx.biometric. + */ implementation files('src/main/libs/android-biometric.aar') + implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0'