I am trying to use the Wifimanager to calculate the Signal Level of the access points found during a scan.
I am using the following method:
WifiManager.calculateSignalLevel(int, int)
But it appears to always return the same int no matter what the RSSI level is.
Here is my code:
public int calculateQoS(int aRSSI){
signalLevel = WifiManager.calculateSignalLevel(RSSI, 5);
return signalLevel;
}
public void testCalculateQoS(){
Log.d("signal", "signal = : "
+ connMonitor.calculateQoS(-44)
+ " " + connMonitor.calculateQoS(-80)
+ " " + connMonitor.calculateQoS(-120)
+ " " + connMonitor.calculateQoS(-20));
}
The logging outputs 1 for all the test cases for calculateQoS(int).
Am I missing something simple here? Why is the SignalLevel always 1?