BiometricPrompt.authenticate() 自定义屏幕
BiometricPrompt.authenticate() with custom screen
我已将我们的应用程序从已弃用的 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 更新日志 https://developer.android.com/about/versions/pie/android-9.0?source=post_page-----d4fc85e55608----------------------#biometric-auth
对于 OnePlus 是一个错误
https://forums.oneplus.com/threads/problems-about-oneplus-6t-fingerprint-api.944959/
我已将我们的应用程序从已弃用的 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 更新日志 https://developer.android.com/about/versions/pie/android-9.0?source=post_page-----d4fc85e55608----------------------#biometric-auth
对于 OnePlus 是一个错误 https://forums.oneplus.com/threads/problems-about-oneplus-6t-fingerprint-api.944959/