Skip to content

Instantly share code, notes, and snippets.

@isaidamier
Created November 26, 2019 02:41
Show Gist options
  • Save isaidamier/12dd440981c6ed9d10303b7ca6a4a008 to your computer and use it in GitHub Desktop.
Save isaidamier/12dd440981c6ed9d10303b7ca6a4a008 to your computer and use it in GitHub Desktop.
createPromptInfo
private fun createPromptInfo(): BiometricPrompt.PromptInfo {
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle(getString(R.string.prompt_info_title))
.setSubtitle(getString(R.string.prompt_info_subtitle))
.setDescription(getString(R.string.prompt_info_description))
// Authenticate without requiring the user to press a "confirm"
// button after satisfying the biometric check
.setConfirmationRequired(false)
.setNegativeButtonText(getString(R.string.prompt_info_use_app_password))
.build()
return promptInfo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment