Android 6上未显示生物识别提示 [英] Biometric prompt not displayed on Android 6

查看:230
本文介绍了Android 6上未显示生物识别提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to use BiometricPrompt to use fingerprint sensor for authentication. My minimum supported sdk is 23 (Android M).

它适用于我测试过的所有Android版本(棉花糖除外)。

在棉花糖中,当我尝试在按钮上使用身份验证方法时,它会从 BiometricPrompt.AuthenticationCallback <调用 onAuthenticationError 方法/ code>并给出错误代码 ERROR_HW_NOT_PRESENT 和错误消息:

In marshmallow when I try to use authenticate method on button click it calls onAuthenticationError method from BiometricPrompt.AuthenticationCallback and it gives error code ERROR_HW_NOT_PRESENT and error messsage:


此设备没有指纹传感器

This device does not have a fingerprint sensor

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

even when device have fingerprint sensor and it also has one or more fingerprint added to it.

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

I have added permission/feature in AndroidManifest.xml.

我在上面使用jetpack库。

I am using jetpack library for above this.


实现'androidx.biometric:biometric:1.0.0-alpha04'

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

推荐答案

此问题已在 beta01 中得到解决,确切地说是此错误:

This has been resolved in beta01, this bug to be exact:

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

这篇关于Android 6上未显示生物识别提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆