Android - connect to known hidden Wi-Fi network
I need to connect to hidden Wi-Fi network programmatically. I know it's SSID, security type and password. For some reason I can't connect it. I can connect to the same network if it's not hidden. Here's my code: // configure the network private void saveWPANetwork(WiFiNetwork network){ WifiConfiguration conf = new WifiConfiguration(); conf.SSID =network.getSSID(); conf.hiddenSSID = true; conf.status = WifiConfiguration.Status.ENABLED; conf.preSharedKey =network.getPassword(); conf.priority = 9999; wifi.addNetwork(conf); wifi.saveConfiguration(); } // connect it protected boolean