5

Possible Duplicate:
android: Determine security type of wifi networks in range (without connecting to them)

Could someone help me see how to check for an open network in the list of available networks.

I am getting the list of networks.

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;
}

How can I check for the open auth?

Community
  • 1
  • 1
  • You need to look at the [`capabilities`](http://developer.android.com/reference/android/net/wifi/ScanResult.html#capabilities) member of the `ScanResult`s – Flexo Jan 28 '12 at 12:34

1 Answers1

2

Check out scanResult.capabilities.

Matt
  • 74,352
  • 26
  • 153
  • 180
Peter Knego
  • 79,991
  • 11
  • 123
  • 154