In blog Android P 中更好的生物识别技术 https://android-developers.googleblog.com/2018/06/better-biometrics-in-android-p.html他们说:“为了确保用户安全,大多数应用程序和设备都有身份验证机制,或者证明你是你的方法。这些机制分为三类:知识因素、拥有因素和生物识别因素。知识因素要求你知道的东西(如 PIN 或密码),占有因素要求你拥有的东西(如令牌生成器或安全密钥),生物识别因素要求你的东西(如你的指纹、虹膜或面部)”。
但当我读到生物识别提示 API, https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt我看不到虹膜或面部文档,仅验证对指纹的支持:“此调用预热指纹硬件,显示系统提供的对话框,并开始扫描指纹。当 BiometricPrompt.AuthenticationCallback.onAuthenticationError(int ,CharSequence)被称为...”
如何使用生物识别技术通过虹膜和面部或任何其他解决方案创建身份验证登录?
安卓6
- 介绍了
FingerprintManager
类为指纹传感器提供支持。
- 开发人员需要构建自己的指纹 UI。
安卓9
- 弃用
FingerprintManager
class.
- 引入了新的生物识别 API,用于访问 OEM 设备上提供的各种生物识别硬件。
- 引入标准化指纹 UI 策略。 OEM 现在可以自定义 UI。应用程序开发人员失去了创建自定义 UI 的能力。
- It includes fingerprint integration only for the
BiometricPrompt
class.
安卓10
- 生物识别 API 现在是AndroidX 生物识别库 https://developer.android.com/jetpack/androidx/releases/biometric,这使得运行 Android 6.0(API 级别 23)或更高版本的所有设备都可以使用 Android 10 的所有生物识别行为。
- Includes fingerprint and face authentication integration for
BiometricPrompt
.
- Introduces the
BiometricManager
class that developers can use to query the availability of biometric authentication
- 如果设备支持多种生物识别技术,用户可以在操作系统设置中指定默认/首选方法。
-
BiometricManager
不会向您提供有关可用方法的信息,它只是返回是否至少有一种可用方法。
-
BiometricManager
不允许您知道正在使用哪种生物识别方法。
-
BiometricManager
如果设备支持多种方法,则不允许您选择首选方法。
- 如果没有生物识别传感器,API 现在允许开发人员指定是否要使用设备凭证 https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder.html#setDeviceCredentialAllowed(boolean)(PIN、图案或密码)。
- 该框架现在为 OEM 提供友好、标准化的 API,以集成对其设备上所有类型生物识别传感器的支持。
- 该框架现在在 Android 10 中内置了对面部身份验证的支持,因此供应商无需创建自定义实现。
- Biometric Library architecture https://source.android.com/security/biometric:
关于虹膜扫描仪,一些 OEM(例如三星)已经将其虹膜传感器的实现与生物识别 API 集成。然而,Android 还没有为 OEM 提供与虹膜传感器交互的标准 API(据我所知),这阻止了基于 AOSP 的 ROM 访问虹膜传感器。
在 AOSP 问题跟踪器中,有一个针对“添加生物识别虹膜 HAL 接口 https://android-review.googlesource.com/c/platform/hardware/interfaces/+/608056”,旨在创建一个 HAL 接口来标准化 Android 框架与虹膜扫描仪的通信方式。不幸的是,该票证中取得的最后进展是在 2018 年 3 月。
更新:安卓11
- Android 11 introduces the BiometricManager.Authenticators https://developer.android.com/reference/android/hardware/biometrics/BiometricManager.Authenticators interface. This interface defines the possible strengths of biometric hardware elements:
-
BIOMETRIC_STRONG
:设备上满足或超过 Android CDD 定义的强要求的任何生物识别(例如指纹、虹膜或面部)。
-
BIOMETRIC_WEAK
:设备上满足或超过 Android CDD 定义的弱要求的任何生物识别(例如指纹、虹膜或面部)。
-
DEVICE_CREDENTIAL
:用于保护设备安全的非生物识别凭据(即 PIN、图案或密码)。
- The ACTION_BIOMETRIC_ENROLL https://developer.android.com/reference/android/provider/Settings#ACTION_BIOMETRIC_ENROLL意图操作调用系统设置并请求用户注册生物识别硬件元素。您可以额外提供强度级别。
- AuthenticationResult API 有一个新方法getAuthenticationType() https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationResult#getAuthenticationType()允许您检查用户是否使用生物识别或设备凭据进行身份验证。
参考
- 显示生物识别身份验证对话框 https://developer.android.com/training/sign-in/biometric-auth
- 生物识别AOSP https://source.android.com/security/biometric
- 一个适用于所有 Android 系统的生物识别 API https://android-developers.googleblog.com/2019/10/one-biometric-api-over-all-android.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)