【发布时间】:2015-10-03 00:28:21
【问题描述】:
我的应用配置并激活了一个接入点:
// 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?
【问题讨论】: