The network unreachable error is always a networking problem. Could be the
local network interfaces (wifi and phone) are turned off or temporarily
disabled, a bad network mask setting, or some router is unable to route an
IP address. It may also be an ipv6 config error. It may be occuring while
trying to resolve DNS (DNS server is unreachable). I have some suggestions:

1) Describe the network environment: emulator or device (which device) WiFi
on or off, wireless network carrier, local network configuration, including
firewalls (if using emulator or WiFi).
2) Test the application in a different network environment (home, office,
friend's house, cafe).
3) Add code that when the exception occurs, tries to access the network by
some other means besides HttpUrlConnection.
4) As 3), but try using a different Android application that accesses the
internet.
5) Try using an IP address instead of hostname.
6) I forgot to add, once the error occurs, how do you get the service to
connect again?

-- 
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