1

I have android application which connect to "hosturl" over the web. This application can connect to hosturl in the initial steps, but after i try to test it for some time(say 20 or more requests), I get above exception and I can not no longer connect to above url.

If i restart my android handset, then application can again connect to the "hosturl" but again I get the exception after I have tried to connect to hosturl few number of times

Could anybody help me here If you have encounter such a behavior with an android application before.

5
  • 1
    I've seen this exception when the device loses Internet connectivity, when you get that exception can you visit the url in the browser? Commented Nov 12, 2012 at 3:14
  • yep, i can connect to the internet with other applications when I get this exception with my android application Commented Nov 12, 2012 at 3:16
  • 3
    I will repeat his question: can you visit that URL in the browser? Not just keeping the connection, because if the site is not under your control, it may be throttling access (especially if it's a lot of requests in a very short time --- like automated requests by code in a loop, for example). No network expert here, but if it's dropping your connections, I guess this should be the expected behavior. Commented Nov 12, 2012 at 3:18
  • yep, I can connect to "hosturl" in the browser when i get this exception Commented Nov 12, 2012 at 3:22
  • I had the same issue and come to know "There was some issue with DNS for that particular domain." Commented Dec 3, 2013 at 6:06

3 Answers 3

2

You probably don't have the INTERNET permission. Try adding this to your AndroidManifest.xml file, right before </manifest>:

<uses-permission android:name="android.permission.INTERNET" />
Sign up to request clarification or add additional context in comments.

1 Comment

If you have read his question carefully, I am sure that you would have spotted This application can connect to hosturl in the initial steps, but after i try to test it for some time(say 20 or more requests), which means that the application can connect to Internet.
2

I met this and I just closed my AVD and start it again and it worked...

1 Comment

What a huge time sink this was. Seems like it happened when I moved from my home network to my work network. Restarting AVD did indeed fix it. Thanks!
0

Check your Internet connection. Check Wifi. Check Server.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.