I need suggestion on handling few Wifi scenarios in my application.
Suppose my application is running and device is kept idle for a while and it has gone into sleep mode. In the sleep mode the wifi is automatically turned off. Now again when the device is brought back from the sleep mode it takes some time to turn on the Wifi state. Now if during this time app background service is making http request, how we handle that scenario?
OR
suppose if Wifi is not available, device is trying to connect to the GPRS/3G and if during this period if user/background service is making the http request, how we handle it in the code?