This error indicates that some router along the path (possibly your
local machine) has no route to the network you're trying to reach.

If you're running on a rooted phone, you can run traceroute <host> to
see the route to the host, if you have it; the busybox version works
well. This will show where the problem lies.

If the routing failure is on the local phone, 'route' will tell you
about the local routing tables, if you're using the BusyBox version of
'route'. You can also get it via 'cat /proc/net/route', but in a much
harder-to-understand format. Don't bother trying to figure out how to
use the built-in version; it's incomplete.

If it's not on the phone, it's not a phone problem. In any event, it's
definitely not an application problem, but a network failure (assuming
you're not trying to connect to some crazy address). It's something
you need to handle gracefully.

If the problem is not on the phone, and you're using wifi, you should
be able to observe the problem from any host on that network (at least
if it's getting the same default gateway, which would normally be the
case). So I'd try that first, rather than dealing with the limited
environment on the phone.

On Feb 6, 1:58 am, himanshu jain <himanshu....@gmail.com> wrote:
> Hi ,
>                I am trying to connect to server through
> HttpUrlConnection, but after sometimes it throws Socket.Net
> Exception :Network Unreachable. I tired alarm manager to wake up the
> phone and get the wifi lock but none seems to work .
>
> Tell me what to do what should i check and alternative ?.
>
> thanks

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