Code example for WifiManager

Methods: isWifiEnabled

	 * @returns {boolean} The status of Wi-Fi in device settings. 
	public boolean isWifiEnabled() { 
		WifiManager wifiManager = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);
		boolean result = wifiManager.isWifiEnabled();
		Log.d(LOG_TAG, "Wifi enabled: " + result);
		return result;
	 * Requests that the user enable the Wi-Fi in device settings. 
	public void switchToWifiSettings() { 
		Log.d(LOG_TAG, "Switch to Wifi Settings");
		Intent settingsIntent = new Intent(Settings.ACTION_WIFI_SETTINGS);
Stop searching for code, let great code find you!  Add Codota to your java IDE