4
可能重复:
android: Determine security type of wifi networks in range (without connecting to them)检测开放的WiFi网络
有人能帮助我了解如何检查可用网络列表中选择一个开放的网络。
我收到网络列表。
List<ScanResult> results = wifiDemo.wifi.getScanResults();
ScanResult bestSignal = null;
for (ScanResult result : results) {
if (bestSignal == null
|| WifiManager.compareSignalLevel(bestSignal.level, result.level) < 0)
bestSignal = result;
}
我该如何检查打开的auth?
您需要查看ScanResult的['capabilities'](http://developer.android.com/reference/android/net/wifi/ScanResult.html#capabilities)成员 – Flexo 2012-01-28 12:34:46