Skip to content

Instantly share code, notes, and snippets.

@Jaosrikate
Created January 25, 2022 16:15
Show Gist options
  • Save Jaosrikate/41eac98129ef1091afc4d929719669df to your computer and use it in GitHub Desktop.
Save Jaosrikate/41eac98129ef1091afc4d929719669df to your computer and use it in GitHub Desktop.
private fun buildBiometricPrompt(): BiometricPrompt.PromptInfo {
return BiometricPrompt.PromptInfo.Builder()
.setTitle(getString(R.string.bio_authen_title))
.setDescription(getString(R.string.bio_authen_description))
.setNegativeButtonText(getString(R.string.bio_authen_negative_button))
.setConfirmationRequired(false) //Allows user to authenticate without performing an action, such as pressing a button, after their biometric credential is accepted.
.setAllowedAuthenticators(BIOMETRIC_STRONG)
.build()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment