1

I have implemented fingerprint authentication (of course with official Android fingerprint SDK!) in my app recently, some of my users have complained that they have fingerprint sensor (with Android 6.0) in their phone but unable to use the feature.

I have done some investigation on that, and I found that Samsung S5 and Note 4 devices have fingerprint sensor with 6.0 but they are not using the official Android fingerprint SDK.

My questions:

  1. Is anyone have the list of devices which uses their own fingerprint SDK.
  2. In this case, I would like to convey the user that your device is not supported by the app. Is there any reliable way I can programmatically find these devices("Devices with unsupported fingerprint sensor with 6.0 & above") and show the message?
halfer
  • 19,824
  • 17
  • 99
  • 186
Ponsuyambu
  • 7,876
  • 5
  • 27
  • 41

1 Answers1

0

You can check it with the FingerprintManager like

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
    if (!fingerprintManager.isHardwareDetected()) { 
        // Device doesn't support fingerprint api. Notify the user.
    }
}

and as usual, you'll need the permission

<uses-permission android:name="android.permission.USE_FINGERPRINT" />
Vijai
  • 1,067
  • 2
  • 11
  • 25
  • this will display the message to all the users who has 6.0 above device with no fingerprint sensor. I have already deactivated the feature for the devices which doesn't support official API with the help of above code snippet. Now, I only want to intimate the users who has 6.0 with unsupported fingerprint sensor. Is there any way to do? – Ponsuyambu Nov 18 '16 at 16:39
  • Did you try the above on a device with no api support? The method returns true only if the fingerprint hardware is present and is functional which is not the case with proprietary sdk – Vijai Nov 18 '16 at 16:44
  • I tried with Note 4 device which has fingerprint sensor, but this API returns false! – Ponsuyambu Nov 18 '16 at 16:50
  • Because the Note4 still doesnt make use of the android standard API and still uses Samsung's proprietary sdk. There has been questions and reports of fingerprint api not working on Note 4 already. You may search for those questions to make sure – Vijai Nov 18 '16 at 16:53
  • True, Note 4 and S5 uses their own fingerprint "Pass SDK" not the official android fingerprint APIs. I just want to know how many devices like this are there and how can I show the message only to this users. – Ponsuyambu Nov 18 '16 at 16:56
  • How many devices,not sure. In fact, if you spend time finding it out, there are good chances one or more device could move to standard sdk byt the time. And whats the problem with the above code? It does what you exactly want - The device runs 6.0+ and the fingerprint hw is not present/API is not supported – Vijai Nov 18 '16 at 17:01