• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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...
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic