before you write a brief introduction to the problems found:
A mobile phone to create hot "mini", b mobile phone in connection with hot spots, the connection of the SSID is called "haha", then use Enablenetwork (NetID, True) method, connection a created hot "mini", the general process is to disconnect the "haha", connect " Mini "hot spots, in this process, most of the mobile phone will be successfully connected to the" mini ", but some mobile phones such as Oppo R7 Plus can not connect to the" mini ", this model of the mobile phone connection process is to disconnect the" haha ", connect the" mini "hotspot, but the last connection or" haha "And that's why.
Originally, Wifimanager.enablenetwork (NetID, true); This method simply executes the command to connect the "specified SSID", even if returning true does not mean that the final connected WiFi is the specified Wiifi, which is why, Because our WiFi disconnect is connected to an SSID, the system reads a priority connection, determines an SSID to connect to, and we just want to connect our SSID so that at this point the equivalent of two threads at the same time, one but our SSID is connected first, System's connection the next step of the connection, it will cause the SSID we just connected, immediately disconnected. Reference Link: http://www.bubuko.com/infodetail-1124873.html, benefit a lot
Also encountered a problem is the connection of hot WiFi wifimanager.addnetwork (wificonfig) Return of the NetID to 1, in this case directly to do the following processing, all the current problems encountered in the demo inside the deal, Children's shoes with the same problem can be downloaded to see
Config.wepkeys[0] = "";
Config.hiddenssid = true;
Config.allowedKeyManagement.set (WifiConfiguration.KeyMgmt.NONE); config.weptxkeyindex = 0;
Download addresses for the following demo solutions
http://download.csdn.net/detail/zs20082012/9718632