I want to know how many phone or system connected to my modem? I tried to scan the IP from 1 to 254 for discovering connected devices. but when im trying InetAddress.isreachable(2000) it works on my phone but does not work on some devices (always return True or always return false).
I also tried to ping the devices but it also worked on my device but did not work on some devices.
I also tried to make a socket to devices but when target's device is Linux like Android it did not work.
Is there anyway to know the devices connected to my modem in android?

thank you

有帮助吗?

解决方案

Here is a Network Scanner that you can think of : android-network-discovery

Features : Discover Machines on a LAN (connect/ping discovery, dns discovery) , TCP Port Scanner (connect() scan)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top