android - Unable to get currently connected WiFi supported encryption type information -


Text after "

I'm using the code below to regain the associated WiFi encryption type,

Code snippet:

  list & lt; WiFi configuration & gt; WifiConfigs = wifiMgr.getConfiguredNetworks (); {WifiConfiguration config: wifiConfigs} {if (! Config = null & amp; ssid.equalsIgnoreCase (config.) For (wifiConfigs = Null & amp; wifiConfigs.size ()> 0!) SSID) {if (Config.allowedKeyManagement.get (KeyMgmt.WPA_PSK)) {encryptionType.append ("WPA_PSK"); } If (config.allowedKeyManagement.get (KeyMgmt.WPA_EAP)) {encryptionType.append ("WPA_EAP"); } If (config.allowedKeyManagement.get (KeyMgmt.IEEE8021X)) {encryptionType.append ("IEEE8021X"); } Else {if (config.wepKeys [0]! = Null) {return "WEP"; } And {return "no"; Problem: As of "802.1x EAP (CCKM)"  in Android device, showing currently connected WiFi access points. encryption type. But the above code always returns "no" as a result  

How do I get real value through Android code (probably using WiFi configuration). thank you in advanced. "Text" itemprop = "text">

I was able to get the encryption type supported by the WiFi access point (currently connected Android mobile device)

) Below the code,
  list & lt; WiFi configuration & gt; WifiConfigs = wifiMgr.getConfiguredNetworks (); {WifiConfiguration config: wifiConfigs} {if (! Config = null & amp; ssid.equalsIgnoreCase (config.) For (wifiConfigs = Null & amp; wifiConfigs.size ()> 0!) SSID) for {integer K = 0; k & lt; config.allowedKeyManagement.size (); k ++) {if (config.allowedKeyManagement.get (K)) {encryptionType.append (""); If (A & lt; kimgat.trings.lamp) {encryption type. Append (keygat strings [k]); }}}}}}  

Hope this helps you


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -