Android Create WiFi Hotspot WPA2-PSK (not WPA) -


i'm creating wifi hotspot following code , it's working.

                    wificonfiguration netconfig = new wificonfiguration();                     netconfig.ssid = apdefaultssid;                     netconfig.allowedauthalgorithms.set(wificonfiguration.authalgorithm.shared);                     netconfig.allowedprotocols.set(wificonfiguration.protocol.wpa);                     netconfig.allowedprotocols.set(wificonfiguration.protocol.rsn);                     netconfig.allowedkeymanagement.set(wificonfiguration.keymgmt.wpa_psk);                     netconfig.allowedkeymanagement.set(wificonfiguration.keymgmt.wpa_eap);                     netconfig.allowedpairwiseciphers.set(wificonfiguration.pairwisecipher.ccmp);                     netconfig.allowedpairwiseciphers.set(wificonfiguration.pairwisecipher.tkip);                     netconfig.allowedgroupciphers.set(wificonfiguration.groupcipher.ccmp);                     netconfig.allowedgroupciphers.set(wificonfiguration.groupcipher.tkip);                     netconfig.presharedkey = apdefaultpassword; 

but it's making wpa-psk security type.how can create hotspot wpa2-psk?


Comments