2

I am trying to write an android tablet application which scans for a set of ip addresses in the local network and check whether they are in use or alive. I am using the

InetAddress.getByName(ipAd).isReachable(100)

but when i check the logs it returns false and true on certain computers on the network. I tried pinging the machines manually and it works like a charm but from the android device not all computers return true. I had also allowed ICMP ping requests on the firewalls of the machines in the local network.

Does anyone have an idea about this?

Thanks in Advance

Cheers

Mr.Noob
  • 1,005
  • 3
  • 24
  • 58
  • Did you try to increase the timeout value? Even though it should be enough for local ping you might get higher values depending on network load, device load etc. – Qben Jun 14 '12 at 16:54

1 Answers1

0

I managed to sort it out. what i did was I sent a broadcast message and implemented a UDPListener. which replied to my broadcast message.

thanks for hte help in advance

Cheers

Mr.Noob
  • 1,005
  • 3
  • 24
  • 58