I am connecting to a remote server in my Android application. I have
noticed that when the device goes to sleep/standby WiFi is
disconnected and that when the device wakes up, it gets reconnected. A
check-Network-Connectivity code has been put before
httpClient.execute(..) call.

An assumption is made that when the data transfer is being done and if
the device goes to sleep then Android runtime will switch to another
medium for connectivity(3G,GPRS etc.). I have a few questions
regarding the same:
1. How seamless is the switch from WiFi to alternate cellular service
say 3G? Does the developer have to do anything at his end?
2. Sometimes, WiFi are preferred over other channels. Is it possible
to wait for WiFi to reconnect? Links to APIs and/or some sample code
would be great.
3. Should I make the thread to explicitly hold a wakelock before it
performs a network IO?


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to