code: public State getWifiState() {
  		if (connMan == null) {
  			connMan = (ConnectivityManager) context
  					.getSystemService(Context.CONNECTIVITY_SERVICE);
  		}
  		NetworkInfo wifiNetworkInfo = connMan.getNetworkInfo(TYPE_WIFI);
  		if (wifiNetworkInfo == null) {
  			return State.UNKNOWN;
  		}
  
  		return wifiNetworkInfo.getState();
  	}
docs: Returns WiFi State Requires ACCESS_NETWORK_SATE, READ_PHONE_STATE
  permissions<br>
  
  @return State