SHARE
TWEET

Untitled

a guest Sep 11th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun hasBiometricEnrolled(context: Context): Boolean {
  2.     return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
  3.         val bm = BiometricManager.from(context)
  4.         val canAuthenticate = bm.canAuthenticate()
  5.         (canAuthenticate == BiometricManager.BIOMETRIC_SUCCESS)
  6.  
  7.     } else {
  8.         false
  9.     }
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top