1

I am diagnosing intermittent connection problems reported to me by my some of my users. Here is one such report from a user, in his own words:

My 3g icon is dim, but regular bars are lit, and it's been like that for a while, so I can consistently run the tests. Your app won't connect - UnknownHostException. Ran connection tests - all failed. Then opened browser, navigated to Google, searched stuff, went to my Flickr account, opened pictures - all the while my 3g icon was dim. This means that my browser was connected while your app couldn't. Another observation: I ran both apps (browser and your app) several times to verify. In majority of runs, 3G icon was dim for both. In a few cases, it would turn on for my browser intermittently, but never for your app. Your app would throw the UnknownHostException instantly without trying a few seconds to send my message (like it usually does).

Can anyone speculate as to why my app would be denied connectivity by the OS (as confirmed by the UnknownHostException) but the Browser would be allowed connectivity just fine? Note that this is generally experienced by users when they are out-and-about.

This is on Android 2.2, LG Ally, T-Mobile.

esilver
  • 27,713
  • 23
  • 122
  • 168
  • When the user is running into this, ask them to visit some URL on the same server as the one your app is trying to reach from their browser. If they cannot get to your site from the browser, then the problem is somewhere outside your app. Testing by visiting Google, Flickr, etc. is an interesting data point but not directly relevant to your app. – CommonsWare Jul 13 '12 at 23:27

1 Answers1

0

Its probably about your servers dns settings. you can try set proxy or solve your servers network problem. to be sure If you get UnknownHostException then try to ping your server at the moment.

setting proxy something like this. not exactly sure/ tried before

Properties p = System.getProperties();
p.put("http.proxyHost","http-proxy.xx.xxxxx.xx");
p.put("http.proxyPort","8080");
System.setProperties(p);
Mert
  • 6,432
  • 6
  • 32
  • 68
  • To clarify - I have tens of thousands of simultaneously connected clients who are able to connect without issue. Further, the client above is only sometimes not able to connect. I do not believe I have a network problem with my servers, I believe it is an issue with the Android OS. – esilver Jul 12 '12 at 22:04
  • I had similiar problem my network guy solved somehow changing something related to dns.. to be sure just ping your server from phone while phone can't connect. – Mert Jul 12 '12 at 22:08