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:
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" />
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.