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

Finally solved. It looks like android default API is not able to handle some Samsung devices, so the solution is to add the Samsung libraries for this issue.

You can find some documentation and the libraries here: http://developer.samsung.com/galaxy/pass

After add the libraries, you have to add a new permission to your manifest:

<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />

And finally, you could use this method:

private boolean isFingerprintSupported() {
  boolean isFingerprintSupported = fingerprintManager != null && fingerprintManager.isHardwareDetected();
  if (!isFingerprintSupported && SsdkVendorCheck.isSamsungDevice()) {
    Spass spass = new Spass();
    try {
        spass.initialize(context);
        isFingerprintSupported = spass.isFeatureEnabled(Spass.DEVICE_FINGERPRINT);
    } catch (SsdkUnsupportedException | UnsupportedOperationException e) {
        // Error handling
    }
  }
  return isFingerprintSupported;
}

Leave a Comment