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