I am trying to use Wifimanager to calculate the Signal Strength of access points found during a scan.
I am using the following method:
WifiManager.calculateSignalLevel (int, int)
But it always returns the same int regardless of the RSSI level.
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));
}
Log output 1 for all test cases for calculating QoS (int).
Did I miss something simple here? Why is SignalLevel always 1?
source
share