You can get the dbm value using WifiManager
.
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
if(wifiManager.isWifiEnabled()) {
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
if(wifiInfo != null) {
int dbm = wifiInfo.getRssi();
}
}
In addition to dbm, if you wish to get the percentage about the signal strength:
int strengthInPercentage = WifiManager.calculateSignalLevel(wifiInfo.getRssi(), 100);