Did you add the internet access permission?
  
http://code.google.com/android/reference/android/Manifest.permission.html#INTERNET

To aid in debugging:
- In your catch setText, you might want to print e.getDescription()
- Look in logcat (ddms perspective or "$ adb logcat") to view a full
description of the error.

R/

On Sun, Nov 30, 2008 at 12:08 PM, Karnius <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I'm trying to ping my website but all i get is a IOException.
>
> I suppose i'm missing something?
>
> Java:
> try {
> InetAddress address = InetAddress.getByName("www.google.com");
> ServerSide.setText("Name: " + address.getHostName()+ " Addr: "+
> address.getHostAddress()+ " Reach: " + address.isReachable(3000));
>
> }
> catch (UnknownHostException e) {
> ServerSide.setText("colis");
> }
> catch (IOException e) {
> ServerSide.setText("Unable to reach ");
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to