Skip to content

Instantly share code, notes, and snippets.

@isaidamier
Created November 26, 2019 02:51
Show Gist options
  • Save isaidamier/e9e5c6b8aba7120de6225e0f4ff91b6e to your computer and use it in GitHub Desktop.
Save isaidamier/e9e5c6b8aba7120de6225e0f4ff91b6e to your computer and use it in GitHub Desktop.
onClickNoCrypto
override fun onClick(view: View) {
val promptInfo = createPromptInfo()
if (BiometricManager.from(context)
.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) {
biometricPrompt.authenticate(promptInfo)
} else {
loginWithPassword()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment