androidandroid-6.0-marshmallowfingerprintgalaxyandroid-6.0.1-marshmallow

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;
}

Solution

  • 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