Created
January 25, 2022 16:31
-
-
Save Jaosrikate/9d8d48bde8bea689116099ad52b0cb08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val biometricManager = BiometricManager.from(this) | |
when (biometricManager.canAuthenticate(BIOMETRIC_STRONG)) { | |
BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED, | |
BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE, | |
BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE, | |
BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED, | |
-> showErrorNoHardwareBio() | |
BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED, | |
BiometricManager.BIOMETRIC_STATUS_UNKNOWN, | |
-> showErrorAndNavigateToSetting() | |
BiometricManager.BIOMETRIC_SUCCESS -> //Ready for prompt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment