简体   繁体   English

为 Android 自定义生物识别提示

[英]Customize the Biometric Prompt for Android

I have an implementation of the Fingerprint Biometric authentication for Android which works pretty much as described by the documentation.我有一个适用于 Android 的指纹生物识别身份验证的实现,它的工作原理与文档中描述的非常相似。 I am trying to remove the close button aka the "setNegativeButtonText" value.我正在尝试删除关闭按钮,也就是“setNegativeButtonText”值。 This will make the biometric auth a requirement instead of an option.这将使生物识别身份验证成为一项要求,而不是一个选项。

Is it possible to do this?是否有可能做到这一点?

BiometricPrompt does not allow that. BiometricPrompt 不允许这样做。 So you won't be able to make the system-provided biometric prompt non-cancelable.因此,您将无法使系统提供的生物识别提示不可取消。 But you can detect whenever user cancels the dialog.但是您可以检测到用户何时取消对话框。

Refer below参考以下

How to make BiometricPrompt non-cancelable? 如何使 BiometricPrompt 不可取消?

You can use that cancel button as UsePassword instead with您可以将该取消按钮用作 UsePassword 而不是

setAllowedAuthenticators

See the release notes here请在此处查看发行说明

https://yggr.medium.com/simple-biometric-authentication-in-android-b01be3c40e6f https://yggr.medium.com/simple-biometric-authentication-in-android-b01be3c40e6f

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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