public static boolean isAvailable ( Context context ) { FingerprintManager manager = ( FingerprintManager ) context . getSystemService ( Context . FINGERPRINT_SERVICE ) ; return ( manager != null && manager . isHardwareDetected ( ) && manager . hasEnrolledFingerprints ( ) ) ; }
Check if a fingerprint scanner is available and if at least one finger is enrolled in the phone .