android - Android 6 上未显示生物识别提示

标签 android android-jetpack android-fingerprint-api android-biometric-prompt

我正在尝试使用 BiometricPrompt 使用指纹传感器进行身份验证。我支持的最低 sdk 是 23 (Android M)。

它适用于我测试过的所有安卓版本,除了棉花糖。

在棉花糖中,当我尝试在按钮单击上使用身份验证方法时,它会调用 onAuthenticationError来自 BiometricPrompt.AuthenticationCallback 的方法它给出了错误代码ERROR_HW_NOT_PRESENT和错误信息:

This device does not have a fingerprint sensor



即使设备具有指纹传感器并且还添加了一个或多个指纹。

我在 AndroidManifest.xml 中添加了权限/功能.

我在上面使用jetpack库。

implementation 'androidx.biometric:biometric:1.0.0-alpha04'



enter image description here

最佳答案

这已在 beta01 中得到解决,确切地说是这个错误:

Fixed inconsistent behavior on API Levels 23 to 27. (b/124066957)

关于android - Android 6 上未显示生物识别提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56545145/

相关文章:

Android 主题不适用于 Activity

android - 我想将微调器值存储在 String 中并将其显示在 Textview 上

android - 撰写崩溃并出现错误 "kotlinx.coroutines.channels.Channel"

android - 检查指纹是否已在三星手机中注册时出现 SecurityException

Android:HttpURLConnection 字符串数据的 ProgressBar

android - 如何在 Flutter 中从一个屏幕导航到另一个屏幕(开始 Activity )并关闭当前屏幕(完成)

android - ViewBinding.getRoot().getLayoutParams() 总是返回 null

android - Jetpack 撰写 : How to detect what is causing a Composable to recompose

android - 自定义 biometricPrompt

android - 如何在指纹认证成功时从 keystore 中获取 key