生物识别对话框

Biometric Dialog

所以,我想在我的 android 应用程序中集成类似于生物识别对话框的功能。我正在关注 google android 文档。 Here's the Link 到文档。但我认为这仅用于指纹认证。如何在同一个对话框中获取两个图标?如果您的 phone 上注册了两件事?他们是否使用自定义 api 进行生物识别?

仅当您在具有面容 ID 且已注册面容 ID 和指纹的设备上使用 Android9 或更高版本时才会出现此对话框

但是在android 9.

的三星设备上不

这是显示它所需的代码:

val biometricPrompt = BiometricPrompt.Builder(context)
.setTitle(title)
.setSubtitle(subtitleText)
.setDescription(description)
.setNegativeButton(negativeButton, executor!!, cancelListener)
.build()

 biometricPrompt.authenticate(cancellationSignal, executor, BiometricCallback)