I am currently building an android application that will soft handover the wifi connection from one Wifi access point to another when the signal level falls below a certain level. My question is how to write a code that frequently checks and monitors the dBm level in android studio?
Asked
Active
Viewed 207 times
1 Answers
0
for (ScanResult result : wifiScanResultList) {
int signalLevel = result.level;
}
Take a look at this question: Getting WiFi signal strength in Android
You can get the WIFI level using this and put this code in a background service which you can run according to how frequently you want to know the level

Kunj Mehta
- 411
- 4
- 11
-
I have done this to get the scan results. I know that I can montor the dBm of the network that I am connected to using `WifiInfo info = myWifiManager.getConnectionInfo(); info.getRssi();` my question is how to constantly monitor the dBm level of the connected network. @Kunj Mehta – Supersic Mar 01 '19 at 18:14
-
You can add a background service in your application that checks for wifi strength at certain intervals. Constant monitoring is a bad idea, drains the battery. Then when it falls below a certain level, use a broadcast listener linked to the service to perform a handvoer – Kunj Mehta Mar 01 '19 at 18:33