I'm looking for a way to get the security type from networks which are configured but not currently in range. That is, from a WifiConfiguration
returned by WifiManager#getConfiguredNetworks()
as opposed to WifiManager#getScanResults()
. Naturally, this could only tell what security type was in use when the network was last in range. That is good enough for my purposes.
The docs for getConfiguredNetworks()
state:
Only the following fields are filled in: networkId, SSID, BSSID, priority, allowedProtocols, allowedKeyManagement, allowedAuthAlgorithms, allowedPairwiseCiphers, allowedGroupCiphers
Therefore, the accepted answer to this question and others like it will not work because it depends on the wepKeys
field. (It also doesn't have a switch case for its own SECURITY_EAP
result.)
Is this possible using the limited information available from getConfiguredNetworks()
?
This is my naïve solution. From what little I know of wifi security, I have a hunch that these conditions are necessary but insufficient to determine the security type. Maybe someone who knows more can elaborate.