Check if current connection is Wi-Fi.

@param context Context to use
@return true if current connection is Wi-Fi false otherwise
188246
public static boolean isCurrentConnectionWifi(Context context) {
    ConnectivityManager cm =
        (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    if (cm == null) {
      return false;
    }
    NetworkInfo info = cm.getActiveNetworkInfo();
    return info != null && info.getType() == ConnectivityManager.TYPE_WIFI;
  }
485126
public static boolean isGet(final WebContext context) {
        return HttpConstants.HTTP_METHOD.GET.name().equalsIgnoreCase(context.getRequestMethod());
    }
174906
private static String getMacAddress(@NonNull Context context) {

        if (isWifiStatePermissionGranted(context)) {
            WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
            if (wifiManager != null) {
                WifiInfo wifiInfo = wifiManager.getConnectionInfo();
                if (wifiInfo != null) {
                    return wifiInfo.getMacAddress();
                }
            }
        }

        return null;
    }
128474
protected boolean doesAppHasInternetPermission(Context context) {
        int result = context.checkCallingOrSelfPermission(Manifest.permission.INTERNET);
        boolean permissionGranted = (result == PackageManager.PERMISSION_GRANTED);

        if (!permissionGranted) {
            PrefHelper.Debug("Trouble executing your request. Please add 'android.permission.INTERNET' in your applications manifest file");
        }

        return result == PackageManager.PERMISSION_GRANTED;
    }
963009
public static boolean isHostInNetworkCard(String host) {
        try {
            InetAddress addr = InetAddress.getByName(host);
            return NetworkInterface.getByInetAddress(addr) != null;
        } catch (Exception e) {
            return false;
        }
    }
822318
public boolean isNetworkConnected() {
		try {
			if (connMan == null) {
				connMan = (ConnectivityManager) context
						.getSystemService(Context.CONNECTIVITY_SERVICE);
			}

			NetworkInfo niMobile = connMan.getNetworkInfo(TYPE_MOBILE);
			NetworkInfo niWifi = connMan.getNetworkInfo(TYPE_WIFI);
			NetworkInfo niMms = connMan.getNetworkInfo(TYPE_MOBILE_MMS);
			NetworkInfo niSupl = connMan.getNetworkInfo(TYPE_MOBILE_SUPL);
			NetworkInfo niDun = connMan.getNetworkInfo(TYPE_MOBILE_DUN);
			NetworkInfo niHipri = connMan.getNetworkInfo(TYPE_MOBILE_HIPRI);
			NetworkInfo niWimax = connMan.getNetworkInfo(TYPE_WIMAX);
			NetworkInfo niBlueTooth = connMan.getNetworkInfo(TYPE_BLUETOOTH);
			NetworkInfo niDummy = connMan.getNetworkInfo(TYPE_DUMMY);
			NetworkInfo niEthernet = connMan.getNetworkInfo(TYPE_ETHERNET);

			if ((niMobile != null && niMobile.isConnected())
					|| (niWifi != null && niWifi.isConnected())
					|| (niMms != null && niMms.isConnected())
					|| (niSupl != null && niSupl.isConnected())
					|| (niDun != null && niDun.isConnected())
					|| (niHipri != null && niHipri.isConnected())
					|| (niWimax != null && niWimax.isConnected())
					|| (niBlueTooth != null && niBlueTooth.isConnected())
					|| (niDummy != null && niDummy.isConnected())
					|| (niEthernet != null && niEthernet.isConnected())) {
				return true;
			}

			return false;
		} catch (Exception e) {
			Log.e(TAG,
					"Exception during isMobileConnected(). - "
							+ e.getLocalizedMessage());
		}
		return false;
	}
772904
def is_connected(self):
        """"""
        self._connected = self._connected and self._conn.is_connected()
        return self._connected
1189767
final boolean isIdle() {
      for(ConnectionPoolConnection conn : connections) {
         if(conn.state.get() == ConnectionPoolConnection.STATE_OPEN) {
            return false;
         }
      }
      return true;
   }
178521
public static boolean isConnected(Context context) {
        if (context == null) {
            return true;
        }
        ConnectivityManager cm = (ConnectivityManager) context
                .getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo info = cm.getActiveNetworkInfo();
        return info != null && info.isConnectedOrConnecting();
    }
1077396
public boolean isWifiConnected() {
		try {
			if (connMan == null) {
				connMan = (ConnectivityManager) context
						.getSystemService(Context.CONNECTIVITY_SERVICE);
			}
			NetworkInfo wifiNetInfo = connMan.getNetworkInfo(TYPE_WIFI);
			NetworkInfo wimaxNetInfo = connMan.getNetworkInfo(TYPE_WIMAX);

			if (wifiNetInfo == null && wimaxNetInfo == null) {
				Log.e(TAG, "wifiNetworkInfo is null.");
				return false;
			}

			if (wifiNetInfo != null && wifiNetInfo.isConnected()) {
				return true;
			}

			if (wimaxNetInfo != null && wimaxNetInfo.isConnected()) {
				return true;
			}
		} catch (Exception e) {
			Log.e(TAG,
					"Exception during isWifiConnected(). - "
							+ e.getLocalizedMessage());
		}
		return false;
	}
137183
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasWifiFeature(Context context) {
        return hasWifiFeature(context.getPackageManager());
    }
209347
protected final boolean isAuthenticated(Context context) {
        Account account = context.getSession(AuthConstants.ACCOUNT_ATTRIBUTE);
        if (account == null) {
            account = context.getLocal(AuthConstants.ACCOUNT_ATTRIBUTE);
        }
        return account != null && account.isAuthenticated();
    }
995916
protected boolean checkConsoleAccess(BeanContext context) {
        String consolePath = getConsolePath(context);
        if (StringUtils.isNotBlank(consolePath)) {
            return context.getResolver().getResource(consolePath) != null;
        }
        return true;
    }
486056
public static boolean isInternetAvailable(Context context) {
        ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            return isInternetAvailable(connectivityManager);
        } else {
            return isInternetAvailablePreLollipop(connectivityManager);
        }
    }
911769
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasSipFeature(Context context) {
        return hasSipFeature(context.getPackageManager());
    }
1002987
public static boolean isAvailable(Context context){
        FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
        if(fingerprintManager!=null){
            return (fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints());
        }
        return false;
    }
339982
public function hasContext($context)
    {
        if ($this->contextConfiguration && array_key_exists($context, $this->contextConfiguration)) {
            return true;
        }

        return false;
    }