Hello I am new in Android and I am developing a simple app which needs just to connect the device to a particular WiFi network. However, sometimes I need to wait the phone to connect like 3-4 minutes. The code I use for connecting is the following: Code (Java): WifiConfiguration robotNetwork=new WifiConfiguration(); myNetwork.SSID="\""+mySSID+"\""; myNetwork.preSharedKey="\""+myPass+"\""; int netID=wifi.addNetwork(myNetwork); wifi.enableNetwork(netID,true); wifi.reconnect(); What am I doing wrong? Thank you in advance!!!