Code example for WifiInfo

Methods: getIpAddressgetLinkSpeedgetRssigetSSID

0
			if(wifiMan.isWifiEnabled()){ 
			String action = intent.getAction(); 
				if (action.equals(wifiMan.WIFI_STATE_CHANGED_ACTION) || action.equals(wifiMan.RSSI_CHANGED_ACTION)) { 
	        	 
	        	 
		        	wifi_ssid = wifi_info.getSSID(); 
			        wifi_ip = wifi_info.getIpAddress(); 
			        wifi_ip_string = android.text.format.Formatter.formatIpAddress(wifi_ip); 
			        wifi_link_speed = wifi_info.getLinkSpeed(); 
			        wifi_signal = intent.getIntExtra(wifiMan.EXTRA_NEW_RSSI, wifi_info.getRssi()); 
 
		            show_wifi.setText(Html.fromHtml("<big>" + "Wifi SSID: " + "</big>" + "<br/>" + "<small>" + wifi_ssid + "</small>" + "<br/><br/>" 
		            		+ "<big>" +  "IP Address: " + "</big>" + "<br/>" + "<small>" + wifi_ip_string + "</small>" + "<br/><br/>" 
		            		+ "<big>" + "Link Speed: " + "</big>" + "<br/>" + "<small>" + wifi_link_speed + " Mbps" + "</small>" + "<br/><br/>" 
		            		+ "<big>" + "Signal Strength: " + "</big>" + "<br/>" + "<small>" + wifi_signal + " dBm" + "</small>" + "<br/><br/>")); 
	            } 
	        	else { 
		        	int state = wifiMan.getWifiState(); 
		        	if((state == wifiMan.WIFI_STATE_DISABLED) || (state == wifiMan.WIFI_STATE_DISABLING) || (state == wifiMan.WIFI_STATE_ENABLING) || (state == wifiMan.WIFI_STATE_ENABLED)) { 
			        	show_wifi.setText(Html.fromHtml("<big>" + "Wifi SSID: " + "</big>" + "<br/>" + "<small>" + "Invalid (Wifi not enabled)" + "</small>" + "<br/><br/>"