code: public static boolean isAvailable(Context context){
          FingerprintManager manager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
          return (manager!=null && manager.isHardwareDetected() && manager.hasEnrolledFingerprints());
      }
docs: Check if a fingerprint scanner is available and if at least one finger is enrolled in the phone.
  @param context A context
  @return True is authentication is available, False otherwise