How to get wifi security type of current wifi network in android
1 answer
You must use ScanResult.capabilities to view your network security type. You can use this without actually scanning the networks by using something like:
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
List<ScanResult> networkList = wifi.getScanResults();
if (networkList != null) {
for (ScanResult network : networkList)
{
String Capabilities = network.capabilities;
Log.w (TAG, network.SSID + " capabilities : " + Capabilities);
}
}
+3
source to share