B
B
Bogdan2019-04-15 13:06:52
Java
Bogdan, 2019-04-15 13:06:52

Android 4.4 won't connect to Wifi after reboot?

Hello. Tell me please. For some reason, when programmatically connecting to Wifi in Android 6, everything works, and Android 4.4 also programmatically connects to Wifi, but after rebooting (Reboot), the device no longer connects, it goes (Authentication error).

WifiConfiguration conf = new WifiConfiguration();
                conf.SSID = "\"" + "some_ssid" + "\"";
                conf.preSharedKey = "\"" + "some_password" + "\"";

                int netID = wifiManager.addNetwork(conf);
                wifiManager.disconnect();
                wifiManager.enableNetwork(netID, true);
                wifiManager.reconnect();

Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question