Code example for WifiManager

Methods: getConnectionInfo, toString

0
			Log.d("BntxSwitchNetworkListener", "Connection status changed: "
					+ info.toString());
			 
			WifiManager wifiManager = (WifiManager) context
					.getSystemService(Context.WIFI_SERVICE);
			WifiInfo wifiInfo = wifiManager.getConnectionInfo();
			Log.d("BntxSwitchNetworkListener", "wifiManager: " + wifiManager.toString());
			Log.d("BntxSwitchNetworkListener", "wifiInfo: " + wifiInfo.toString());
			Log.d("BntxSwitchNetworkListener", "SSID: " + wifiInfo.getSSID());
			 
			bulb.setConnected(info.isAvailable());
			getTextView().setVisibility(
					bulb.isConnected() ? TextView.INVISIBLE : TextView.VISIBLE);
		} 
	} 
}