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 wifi 强度获得
最新推荐文章于 2021-05-27 05:02:08 发布