我已将我们的应用程序从不建议使用的FingerprintManager迁移到Biometric API
。该应用程序当前具有一个自定义片段,其实际作用类似于新的BiometricPrompt
。我想继续使用此自定义页面,因此不显示BiometricPrompt。问题是激活身份验证的方法是通过创建此提示并显示它。
biometricPrompt.authenticate(BiometricPrompt.PromptInfo.Builder()
.setTitle("Title text goes here")
.setSubtitle("Subtitle goes here")
.setDescription("This is the description")
.setNegativeButtonText("Cancel")
.build()
)
如何避免显示BiometricPrompt并仅激活身份验证?
PS:在我的OnePlus6T上,实际上由于设备的屏幕指纹扫描而没有显示该提示,但是在所有其他屏幕上都显示了该提示。
不可能。 BiometricPrompt是指纹的新统一请求对话框
请参阅Android 9 ChangeLog->隐私和安全https://www.android.com/versions/pie-9-0/
对于OnePlus是一个错误https://forums.oneplus.com/threads/problems-about-oneplus-6t-fingerprint-api.944959/