code: public boolean isWifiEnabled() {
  		WifiManager wm = (WifiManager) context
  				.getSystemService(Context.WIFI_SERVICE);
  		if (wm == null) {
  			return false;
  		}
  
  		return wm.isWifiEnabled();
  	}
docs: Checks if WiFi is turned on<br>
  Requires ACCESS_NETWORK_SATE, READ_PHONE_STATE permissions<br>
  
  @return true if WiFi is turned on; false otherwise