当我连接到特定的SSID时,每当我以编程方式连接到SSId时,它就会创建一个重复的网络。
这是我用来连接SSID的代码
WifiConfiguration wifiConfiguration = new WifiConfiguration();
wifiConfiguration.SSID="\"xsinfosol\"";
wifiConfiguration.preSharedKey="\""+ networkPASS +"\"";
//wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
Toast.makeText(context, "connect to::"+networkSSID, 0).show();
int netId = wifiManager.addNetwork(wifiConfiguration);
//wifiManager.addNetwork(wifiConfiguration);
wifiManager.disconnect();
wifiManager.enableNetwork(netId, true);
wifiManager.reconnect();
请帮忙