From af91977f82d420a5685a9612e1b60b7a65c83bfc Mon Sep 17 00:00:00 2001 From: Michael Alicea Date: Sun, 18 Jun 2017 17:25:35 -0400 Subject: [PATCH] fix(android-fingerprint-auth): fix return type of isAvailable (#1697) As seen in the Cordova plugin (https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth) the isAvailable method returns an object that contains 3 parameters, {isAvailable:, isHardwareDetected, hasEnrolledFingerprints}. If you do a console log on this.androidFingerprintAuth.isAvailable() .then(res => console.log(res)) //Outputs the Object {isAvailable: true, isHardwareDetected: true, hasEnrolledFingerprints: true} .catch(err => console.error(err)); So we are getting the data, just need to make the interface expose it. --- src/@ionic-native/plugins/android-fingerprint-auth/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/android-fingerprint-auth/index.ts b/src/@ionic-native/plugins/android-fingerprint-auth/index.ts index 2d14f6bcc1..2366e86bbf 100644 --- a/src/@ionic-native/plugins/android-fingerprint-auth/index.ts +++ b/src/@ionic-native/plugins/android-fingerprint-auth/index.ts @@ -192,7 +192,7 @@ export class AndroidFingerprintAuth extends IonicNativePlugin { * @returns {Promise} Returns a Promise that resolves if fingerprint auth is available on the device */ @Cordova() - isAvailable(): Promise<{ isAvailable: boolean }> { return; } + isAvailable(): Promise<{ isAvailable: boolean, isHardwareDetected: boolean, hasEnrolledFingerprints: boolean }> { return; } /** * Delete the cipher used for encryption and decryption by username