• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

InetAddress isReachable

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
YO

InetAddress.isReachable only finds localhost

is there a solution to this?
google have not been kind too me...


i have also tried to create a Socket
but when i do
new Socket(address, port);
i get SocketTimeOutException

could there be a connection?

and i do have
<uses-permission android:name="android.permission.INTERNET" />
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Niklas: what exactly are you trying to do? Are you trying to check if a certain IP is reachable from your phone?
From what I have heard, InetAddress#isReachable() might not work as one might expect.
 
Niklas Andersson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Monu Tripathi wrote:Niklas: what exactly are you trying to do? Are you trying to check if a certain IP is reachable from your phone?
From what I have heard, InetAddress#isReachable() might not work as one might expect.



basicly
was trying to to find a way to ping an ip with random data

used that with my first attemt to get it to work

right now im starting a new process with the phones existing ping
and processing the output for the information


if you create a InetAddress from string address "www.google.com" for example
the InetAddress will have the correct IP
since that works i dont really understand why
isReachable() does not...
reply
    Bookmark Topic Watch Topic
  • New Topic