mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
168 stars 131 forks source link

FingerprintAuth is not defined #138

Open ghena opened 4 years ago

ghena commented 4 years ago

Hi guys, Using a onDeviceReady callback , FingerprintAuth is undefined. I'm trying using an android 8.0.0 device with fingerprint support builded with phonegap 9.0.0 Maybe I miss something in configuration. I hope for your advice. Config: `

<preference name="pgb-builder-version" value="2" />
<engine name="android" spec="7.0.0" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="23" />
<preference name="android-targetSdkVersion" value="29" />`

// DeviceReady callback function ` var onDeviceReady = function(){ // Here the code to verificate the fingerprint

FingerprintAuth.isAvailable(isAvailableSuccess, isAvailableError); /**

  • @return {
  • isAvailable:boolean,
  • isHardwareDetected:boolean,
  • hasEnrolledFingerprints:boolean
  • } */ function isAvailableSuccess(result) { console.log("FingerprintAuth available: " + JSON.stringify(result)); if (result.isAvailable) { var encryptConfig = {}; // See config object for required parameters FingerprintAuth.encrypt(encryptConfig, encryptSuccessCallback, encryptErrorCallback); } }

    function isAvailableError(message) { console.log("isAvailableError(): " + message); }

};`

WuglyakBolgoink commented 4 years ago

@ghena fixed?

try to do:

$ cordova prepare

or re'install android platform