I have a device which has a fingerprint sensor on a home button. Other applications seems to recognise and handle it properly however the application I am building is failing at couple of steps:
I am using android.support.v4.hardware.fingerprint.FingerprintManagerCompat
// at this point isHardwareDetected returns false
val fingerprintManager = FingerprintManagerCompat.from(context)
if (!fingerprintManager.isHardwareDetected) {
return false
}
If I skip hardware detection step it still fails at
// hasEnrolledFingerprints returns false even tough there
// are couple of fingerprints registered
if (!fingerprintManager.hasEnrolledFingerprints()) {
return false
}
The device is UMI Plus E Android 6.0.1
What can be wrong with it?
Additionally here's my manifest regarding fingerprint:
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-feature android:name="android.hardware.fingerprint" android:required="false" />
Edit
I solved this issue by using reprint library: https://github.com/ajalt/reprint