-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
  • 34,476
  • 22
  • 104
  • 118
Sterling Diaz
  • 3,789
  • 2
  • 31
  • 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
  • 82,559
  • 17
  • 97
  • 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