Android – Calculando a intensidade do sinal wifi (Getting WiFi signal strength in Android)

android wifi

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
int numberOfLevels = 5;
WifiInfo wifiInfo = wifiManager.getConnectionInfo();Referência
int level = WifiManager.calculateSignalLevel(wifiInfo.getRssi(), numberOfLevels);

Referência: https://developer.android.com/reference/android/net/wifi/WifiManager.html#calculateSignalLevel%28int,%20int%29