I am building an application reading the signal strength of each available Wifi access point.
I've written code like:
wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
// Get WiFi status
WifiInfo info = wifi.getConnectionInfo();
textStatus.append("
WiFi Status: " + info.toString());
// List available networks
List<WifiConfiguration> configs = wifi.getConfiguredNetworks();
However, I have two problems:
In debugging, configs
only contains one connection. However, I can see that there are several APs available in the system's wifi setting. I.e. configs
is an incomplete list.
I don't know how to get the signal strength in WifiConfiguration
.
btw, I am using HTC Hero and Android 1.5.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…