简体   繁体   中英

Android FingerPrint isHardwareDetected not working

I have some problems whit the Samsung S5 and Huawei M2.

My Huawei has not API 23 but my S5 has Android 6.0 and fingerPrint.

public static boolean checkHaveFingerHardware(Context ctx) {
    FingerprintManager fingerprintManager;
    if (Build.VERSION.SDK_INT < Global.API23) {
        AppLogger.w("API < 23");
        return false;
    } else {
        fingerprintManager = (FingerprintManager) ctx.getSystemService(Service.FINGERPRINT_SERVICE);
    }
    if (!fingerprintManager.isHardwareDetected()) {
        AppLogger.w("Not FingerPrint");
        return false;
    }
    return true;
}

It is mandatory for Android Fingerprint API that the android version is equal or superior to Android 6.

It seems that this is a common problem with multiple Samsung devices such as Galaxy S5 running Android 6+:

Android M FingerprintManager.isHardwareDetected() returns false on a Samsung Galaxy S5

FingerPrint API isHardwareDetected always returns false

The only solution is that you can implement the Samsung Pass Api for those devices:

http://developer.samsung.com/galaxy/pass

http://img-developer.samsung.com/onlinedocs/sms/pass/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM