Code example for WifiInfo

Methods: getLinkSpeedgetRssi

0
 
			WifiInfo wifiInfo = wifiManager.getConnectionInfo();
 
			Log.i("NetworkManager",
					"Wifi connected: " 
							+ String.valueOf(wifiInfo.getLinkSpeed() + "mbps"));
 
			return new InternetConnection(WIFI_CODE, WIFI_STRING,
					wifiInfo.getLinkSpeed(), wifiInfo.getRssi(),
					hasActiveInternetConnection()); 
 
		} 
 
		case MOBILE_CODE: {
			TelephonyManager telephonyManager = (TelephonyManager) context
					.getSystemService(Context.TELEPHONY_SERVICE);
			int mobileNetworkType = telephonyManager.getNetworkType();
			Log.i("NetworkManager",
					"Mobile: " 
							+ decodeMobileNetworkType(mobileNetworkType)
Contextual code suggestions in your IDE  Get Codota for Java