My application is making call to server at regular intervals. This requires internet connection either using Wi-Fi or GPRS.
This works ok when phone is waken (screen light is on). But, as soon as phone lights are off, it makes HttpWebRequest and tried to get Internet connection. Mobile starts connecting to Wi-Fi. But, Application does not wait for establishing connection to Wi-Fi.
- How can I connect to Wi-Fi or GPRS before making HttpWebRequest?
- How to specify that I want to connect to Wi-Fi or GPRS?
I think their are two approaches to do: