问题标签 [android-biometric]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
684 浏览

android - How to pass an activity in BiometricPrompt object in android

In my mobile application, I have created a separate class file to implement the BiometricManager and BiometricPrompt to use the fingerprint authentication. I have to trigger the Biometric popup in three activities, so I created a common function in separate class file. But the BiometricPrompt object has three parameters such as activity, executor & authentication callback. If I pass the Login activity object (in below code) then it is throwing an error as "Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call". Can somebody please help to fix this issue. Thanks in advance.

Please check the below log error I got in logcat.

0 投票
0 回答
29 浏览

android - 有什么方法可以确定在 adnroid 生物识别上使用了哪个 biometrick 提供程序?

我使用 androidx.biometric:biometric 库。我想知道使用什么类型的生物识别用户。它需要分析。有什么方法可以确定使用了哪个生物识别提供商?我是说人脸还是指纹?

0 投票
1 回答
78 浏览

android - BIOMETRIC_ERROR_HW_UNAVAILABLE 的可能原因是什么?

我从代码中找到了这个定义

由于已经存在BIOMETRIC_ERROR_NO_HARDWARE设备没有硬件并且定义BIOMETRIC_ERROR_HW_UNAVAILABLE有“稍后重试”的情况,因此看起来BIOMETRIC_ERROR_HW_UNAVAILABLE意味着硬件在那里。只是目前不可用。如果是这样,可能的原因是什么?

0 投票
0 回答
82 浏览

android - isGestureDetectionAvailable 在 Android 10 上返回 false

isGestureDetectionAvailable()始终返回 false。我在 SO 上查看了这个问题,过去几年所有遇到同样问题的人都没有得到答案或得到解决。这里这里以及其他任何地方。答对有50分奖励,以示感谢。

AndroidManifest.xml

指纹SVC

构建.gradle

我正在测试搭载 Android 10 的三星 M11。我没有其他设备可以测试。

0 投票
1 回答
679 浏览

android - 哪款 Android 设备具有 BIOMETRIC_STRONG(第 3 类)人脸身份验证?

我已经在我的应用程序中使用生物特征级别BIOMETRIC_STRONG (Class 3)实现了生物特征认证。指纹认证按预期工作,但我无法在我的任何设备(三星 Galaxy S10、Oppo A3S 等)上测试面部认证。我认为这些设备中的面部认证不属于第 3 类。

是否有任何具有BIOMETRIC_STRONG (Class 3)人脸身份验证的 Android 设备?如果有人可以提供一份清单,那将会很有帮助。

0 投票
0 回答
85 浏览

android - BiometricManager.canAuthenticate() = BIOMETRIC_SUCCESS 但 BiometricPrompt.AuthenticationCallback() 在锁定时返回 errorCode 9

正如标题所说,我的项目BiometricManager.from(context).canAuthenticate()用于确定用户是否有资格被提示输入生物识别,然后BiometricPrompt用于实际保存/访问密码。

一旦生物识别成功设置并且我强制执行 5 次不正确的指纹扫描将用户锁定,下次用户尝试进行身份验证时,我会从中获得“成功”值,canAuthenticate()但是当BiometricPrompt调用onAuthenticationError()回调时,将使用 errorCode 9 触发回调。这将离开处于不确定状态的用户总是“启用”生物识别技术但无法使用它们。在调用 BiometricPrompt 之前是否有任何已知的方法来检查锁定?

canAuthenticate() 成功

生物识别提示错误

0 投票
0 回答
46 浏览

android - 认证后如何取消 FingerprintManager.AuthenticationCallback?

当我收到此错误代码FINGERPRINT_ERROR_LOCKOUT时,我必须等待 30 秒才能重试,但 30 秒后再次尝试放手指时什么也不会发生,为什么?我可以在身份验证后取消 FingerprintManager.AuthenticationCallback 吗?因为我想在得到上面的错误码后重新认证。

代码

有什么解决办法吗?

0 投票
1 回答
66 浏览

android - 我可以在 API 28 或更高版本中使用 FingerprintManager 代替 BiometricPrompt 吗?

我可以在 API 28 或更高版本中使用FingerprintManager代替BiometricPrompt吗?

我注意到有很多应用程序使用了 AuthenticationCallback 但不确定 AuthenticationCallback 是否返回,FingerprintManager或者BiometricPrompt在使用 AuthenticationCallback 时这些应用程序不显示对话框。

我不想使用BiometricPrompt,因为我不想显示任何对话框,所以在 API 28 或更高版本中FingerprintManager使用它是否很好?BiometricPrompt

0 投票
0 回答
117 浏览

android - BiometricPrompt 描述在 Android 12 中被截断

我可以从 android 文档中添加的 Android 12 新功能/API 中看到的唯一相关内容是“BiometricPrompt 的可本地化字符串”

我的问题如下图所示,代码看起来像

在此处输入图像描述

A<br>或 a\n在这里也不起作用。

有没有人遇到过这个?并有可靠的解决方案?

0 投票
0 回答
246 浏览

android - 限制用户仅进行指纹认证

嗨,我是一个新手,目前正在学习移动开发。我正在开发一个应用程序,当用户按下登录按钮时,它只会提供指纹身份验证选项。但就我而言,它为用户提供了使用指纹或面部身份验证的选项。如何将用户限制为仅指纹身份验证? 在这里,我使用以下代码: