android wifi 强度获得

		WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
					WifiInfo info = wifiManager.getConnectionInfo();
					if (info.getBSSID() != null) {
						int strength = WifiManager.calculateSignalLevel(
								info.getRssi(), 5);
						int speed = info.getLinkSpeed();
						String units = WifiInfo.LINK_SPEED_UNITS;
						String ssid = info.getSSID();
						Toast.makeText(
								InventoryPriorityCount_ConfirmActivity.this,
								"strength:" + strength + "  speed:" + speed
										+ "  units:" + units + " ssid:" + ssid,
								500).show();
						return;
					}

你可能感兴趣的:(android)