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.
This commit is contained in:
Michael Alicea 2017-06-18 17:25:35 -04:00 committed by Ibby Hadeed
parent 07443e0b53
commit af91977f82

View File

@ -192,7 +192,7 @@ export class AndroidFingerprintAuth extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device * @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device
*/ */
@Cordova() @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 * Delete the cipher used for encryption and decryption by username