That's not good! Still hoping it's just something we're doing wrong. I
tried using the connectivity manager. It reports that I have an
available network etc. I tried running the route tests:

  ConnectivityManager cm = (ConnectivityManager)
mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo netActive = cm.getActiveNetworkInfo();
  if (netActive != null) {
      int hostGoogle = ipToInt("24.28.193.9");
      boolean tryGoogle = cm.requestRouteToHost(netActive.getType(),
hostGoogle);
  }

is this the right way to test for connectivity? If I feed that
requestRouteToHost() function an invalid IP address, it still returns
true. Any ideas?

Thanks

On Nov 17, 1:30 am, "SoftwareForMe.com SoftwareForMe.com"
<softwareforme....@gmail.com> wrote:
> I have no idea, but I've also noticed the Browser taking an inordinately
> long time to fetch pages, the Android Market often failing, and other
> networking issues. I wonder why this doesn't seem to be more well known?
>
> Scott
> SoftwareForMe.com
> Makers of PhoneMyPC
>
>
>
>
>
> On Mon, Nov 16, 2009 at 3:12 PM, Mark Wyszomierski <mar...@gmail.com> wrote:
> > I don't understand this - how are people getting around this?
> > Restarting the app probably isn't too pleasant for the user!
>
> > Thanks
>
> > On Nov 15, 2:27 pm, "SoftwareForMe.com SoftwareForMe.com"
> > <softwareforme....@gmail.com> wrote:
> > > I have seen this too, but what's worse, I've found socket connections
> > taking
> > > to long to connect, even when not using DNS.
>
> > > For example, our software can connect to a PC via LAN using an IP
> > address.
> > > Sometimes it will take > 5 seconds, sometimes it will time out. In either
> > > case, after such a failure, if I close and re-run the app, it connects
> > > immediately.
>
> > > This problem started around the time 1.6 was released.
>
> > > SoftwareForMe.com
> > > Makers of PhoneMyPC
>
> > > On Sun, Nov 15, 2009 at 10:33 AM, Mark Wyszomierski <mar...@gmail.com
> > >wrote:
>
> > > > How are you all getting around this issue? I am running into it on
> > > > some phones given out as demos (G1s running 1.5). About 50% of the
> > > > time, my network requests will just hang for about two minutes, then
> > > > throw:
>
> > > >   java.net.UnknownHostException: Host is unresolved: myapi.me.com:80
>
> > > > this looks embarrassing since the users can open pages through the
> > > > browser ok - what is going on?
>
> > > > Thanks
>
> > > > On Oct 26, 10:05 am, purvi <purvi.n...@gmail.com> wrote:
> > > > > Hello,
>
> > > > > I am also facing the same problem. I am using a handler to fetch the
> > > > > data coming from the network request. I am thinking to throw an alert
> > > > > message to the user from my app indicating "No Response from Network"
> > > > > or "Network down" or somthing like that so that the user donot see
> > any
> > > > > error and the user himself restart the app or take corresponding
> > steps
> > > > > instead of showing user an error. But I system gets to know that
> > there
> > > > > is no network after all my queries are manipulated and so I dont know
> > > > > where exactly can I handle this error. I am able to made it print in
> > > > > my LogCat "error[URL not found]" so it doesnot give any "Force Close
> > > > > error" but I want the user to be notified about this.
>
> > > > > Can you please comment on this and incase if you can help me out with
> > > > > this?
>
> > > > > Thanks a lot.
> > > > > Regards,
> > > > > Purvi
>
> > > > > On Oct 15, 2:26 am, "tomei.ninge...@gmail.com"
>
> > > > > <tomei.ninge...@gmail.com> wrote:
> > > > > > More info: I found out that the web site returns multiple IP
> > addresses
> > > > > > on the DNS lookup (see the "Resolving i2.sinaimg.cn line below).
> > This
> > > > > > appears to be for load balancing purposes. Could this be the reason
> > > > > > that got Android confused?
>
> > > > > > $ wgethttp://i2.sinaimg.cn/IT/2009/1014/20091014235428.jpg
> > > > > > --23:20:59--  http://i2.sinaimg.cn/IT/2009/1014/20091014235428.jpg
> > > > > >            => `20091014235428.jpg.1'
> > > > > > Resolving i2.sinaimg.cn... 61.172.207.61, 61.172.207.62,
> > > > > > 61.172.207.64, ...
> > > > > > Connecting to i2.sinaimg.cn|61.172.207.61|:80... connected.
> > > > > > HTTP request sent, awaiting response... 200 OK
> > > > > > Length: 93,820 (92K) [image/jpeg]
>
> > > > > > On Oct 14, 9:53 pm, "tomei.ninge...@gmail.com"
>
> > > > > > <tomei.ninge...@gmail.com> wrote:
> > > > > > > My problem may not be the same. I got this only on actual G1
> > device,
> > > > > > > not on emulator.
>
> > > > > > > Also, if G1 is connect to my home WiFi network (comcast), the DNS
> > for
> > > > > > > i0.sinaimg.cn is resolved without any problem. However, if I
> > > > > > > disconnect Wifi and use TMO USA 3G network, the DNS never
> > resolves.
>
> > > > > > > On Oct 14, 9:29 pm, for android <forandr...@gmail.com> wrote:
>
> > > > > > > >http://code.google.com/p/android/issues/detail?id=2764
>
> > > > > > > > On Thu, Oct 15, 2009 at 4:40 AM, tomei.ninge...@gmail.com <
>
> > > > > > > > tomei.ninge...@gmail.com> wrote:
>
> > > > > > > > > Hello,
>
> > > > > > > > > This happens only when my G1 phone is on T-Mobile network:
>
> > > > > > > > > I found that when I try to go to the browser, and type the
> > > > address
>
> > > > > > > > >    http://i0.sinaimg.cn/
>
> > > > > > > > > The browser tries to load the page, but no progress is shown
> > for
> > > > more
> > > > > > > > > than 2 minutes.
>
> > > > > > > > > (I have full 3G signal; all other addresses work just fine)
>
> > > > > > > > > Eventually when I tried to access this URL in my Java code, I
> > > > found a
> > > > > > > > > similar long delay when I try to open the HttpUrlConnection,
> > and
> > > > > > > > > eventually I get thisexception:
>
> > > > > > > > > I/InetAddress( 1940):Unknownhosti0.sinaimg.cn, throwing
> > > > > > > > > UnknownHostException
> > > > > > > > > W/System.err( 1940): java.net.UnknownHostException:Hostis
> > > > > > > > > unresolved: i0.sinaimg.cn:80
> > > > > > > > > W/System.err( 1940):    at
> > > > java.net.Socket.connect(Socket.java:1002)
>
> > > > > > > > > Why would DNS take so long? Also, if my program tries to
> > issue
> > > > the
> > > > > > > > > same HTTP request again, the same 2+ minute blocking
> > happened.
>
> > > > > > > > > Is this an Android bug or a T-Mobile infrastructure bug? It
> > seems
> > > > the
> > > > > > > > > Android API should try to time-out faster, especially on the
> > > > second
> > > > > > > > > attempt.- Hide quoted text -
>
> > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > - Show quoted text -
>
> > > > --
> > > > 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<android-developers%2Bunsubs
> > > >  cr...@googlegroups.com><android-developers%2Bunsubs
> > cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Warm regards,
> > > The PhoneMyPC Team
>
> > --
> > 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<android-developers%2Bunsubs 
> > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Warm regards,
> The PhoneMyPC Team

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