我的应用程序配置并激活了一个接入点:
// Expose the required method
WifiManager wifimanager = (WifiManager)context.getSystemService(Context.WIFI_SERVICE);
Method setWifiApEnabled = wifiManager.getClass().getMethod("setWifiApEnabled", WifiConfiguration.class, boolean.class);
// Set up my configuration
WifiConfiguration myConfig = new WifiConfiguration();
myConfig.SSID = "markhotspot";
myConfig.allowedProtocols = WifiConfiguration.Protocol.RSN;
myConfig.preSharedKey = "markpass";
// Configure and enable the access point
setWifiApEnabled.invoke(wifiManager, myConfig, true);
热点正确出现,但没有安全性 - 没有 WPA2、WPA、WEP 等。
请问我怎样才能让它使用WPA2?