简体   繁体   English

指纹传感器6.0以上的设备未使用Android指纹SDK

[英]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: 我的问题:

  1. Is anyone have the list of devices which uses their own fingerprint SDK. 是否有人拥有使用自己的指纹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? 有没有可靠的方法我可以通过编程方式找到这些设备(“ 带有不支持的6.0及以上指纹传感器的设备 ”)并显示消息?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM