3

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;
}
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Pabel
  • 652
  • 7
  • 15

1 Answers1

2

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

Community
  • 1
  • 1
elabi3
  • 70
  • 3