arielhernandezmusa / capacitor-biometric-auth

34 stars 22 forks source link

Unable to use in Android #3

Closed Sartxi closed 4 years ago

Sartxi commented 4 years ago

iOS worked great but when I built and installed for Android .isAvailable was triggering a type error. So I console logged BiometricAuth and it came back undefined.

arielhernandezmusa commented 4 years ago

@Sartxi , did you add:

add(BiometricAuth.class);

to init on MainActivity?

luisbecerra commented 4 years ago

I added this this sentence on MainActivity but the method verify does not work.

verify method send data to Android but capacitor does not return any response

Screen Shot 2020-02-26 at 10 08 44 PM
Sartxi commented 4 years ago

Adding these lines to the MainActivity file fixed it for me! import com.ahm.capacitor.biometric.BiometricAuth; and to the init() add(BiometricAuth.class);

Thanks @arielhernandezmusa

Sartxi commented 4 years ago

I added this this sentence on MainActivity but the method verify does not work.

verify method send data to Android but capacitor does not return any response

Screen Shot 2020-02-26 at 10 08 44 PM

I am actually seeing this problem too

vennelakodali commented 4 years ago

I added the necessary permissions to AndroidManifest.xml

    <uses-feature android:name="android.hardware.fingerprint" android:required="true" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />
    <uses-permission android:name="android.permission.USE_FINGERPRINT" />

and enabled fingerprinting on the device, then tested it, worked fine for me.