Android connect to Open WiFi programmatically by name - which is Best solution?
问题 I been trying to use two methods to programmatically connect to a open wifi (connective portal) by name. I used op1, but it only works about 80% of times. _____________________________________________________ op1 : public static void connectToWifi(Context context, String networkSSID) { WifiConfiguration conf = new WifiConfiguration(); conf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);