[英]Devices with fingerprint sensor above 6.0 which are not using Android fingerprint SDK
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. 我最近在我的应用程序中实现了指纹认证(当然还有官方的Android指纹SDK!),我的一些用户抱怨他们的手机中有指纹传感器(带有Android 6.0),但无法使用该功能。
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. 我对此做了一些调查,我发现三星S5和Note 4设备有6.0的指纹传感器,但他们没有使用官方的Android指纹SDK。
My questions: 我的问题:
You can check it with the FingerprintManager like 您可以使用FingerprintManager进行检查
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" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.