public static boolean isAvailable ( Context context ) { FingerprintManager fingerprintManager = ( FingerprintManager ) context . getSystemService ( Context . FINGERPRINT_SERVICE ) ; if ( fingerprintManager != null ) { return ( fingerprintManager . isHardwareDetected ( ) && fingerprintManager . hasEnrolledFingerprints ( ) ) ; } return false ; }
Check if fingerprint authentication is supported by the device and if a fingerprint is enrolled in the device .