yesterday I installed WiFi Kill on my device for the first time, and I was amazed by its features although it is a bit buggy on my device (HTC Evo 3D GSM)
One of the things that I really missed to use this app to its full potential is automatic hostname resolving. Just having a list of MAC and IP addresses isn't that practical.
I was looking around for a way to resolve hostnames of machines running Windows, and I stumbled upon a library called jcifs. With that library I managed to resolve all of the hosts. Here is the method that I used in my test project:
- Code: Select all
private static String resolve(String IPaddr)
IPaddr = UniAddress.getByName(IPaddr).getHostName();
you need the jcifs-1.2.25.jar file which you can download from http://jcifs.samba.org/src/
(you need the older version since the newer versions have this feature disabled because it was deemed "unreliable". But hey, it's better than nothing!)
I think this is mostly useful when joining new networks, or when new devices join your network.
resolving in action in my test app:
NOTE: MAX-ASUS is displayed twice in the list. That's not a bug, my laptop was connected to both LAN and WLAN at that time
This currently only works for Windows machines, but I'll try to find methods to identify other platforms.
Could you please give this a shot?