我在我的 Android 应用程序中添加了生物识别提示。所以在应用程序启动时,我能够显示提示,如果成功能够在仪表板屏幕上重定向用户。如果用户失败,我想显示系统密码作为验证的辅助选项。如何使用生物识别提示来做到这一点?
mBiometricManager = new BiometricManager.BiometricBuilder(FingerprintActivity.this)
.setTitle(getString(R.string.biometric_title))
.setSubtitle(getString(R.string.biometric_subtitle))
.setDescription(getString(R.string.biometric_description))
.setNegativeButtonText(getString(R.string.biometric_negative_button_text))
.build();
mBiometricManager.authenticate(FingerprintActivity.this);