-1
try {
    InetAddress i = InetAddress.getByName("http://www.google.com");
    Log.e("InetAddress", "InetAddress");
} catch (UnknownHostException e1) {
    e1.printStackTrace();
}

It gives an unknownHostException. That is the onl thing that the app does with the server. Why is that happening and how can I solve it?

Kjuly
  • 33,479
  • 22
  • 100
  • 115
Sterling Diaz
  • 3,557
  • 2
  • 28
  • 35
  • 1
    Thank you for finally including code, but you need to edit this information into your [first question](http://stackoverflow.com/q/12903644/1267661) on this subject (as this is the third time you have asked). Please consult the [faq] on acceptable ways to get more attention to an unanswered question. – Sam Oct 19 '12 at 20:07

1 Answers1

1

Do you have permissions set up for the device to use the internet?

What permission do I need to access Internet from an android application?

Community
  • 1
  • 1
John Boker
  • 80,803
  • 17
  • 95
  • 130
  • The question that i have is do you have `` in your manifest that gives the app permission to use the internet. – John Boker Oct 23 '12 at 17:20