I have an Android app that accesses a Windows using the server name. This is working in many environments but in some network environments, Android is proving surprisingly inept at resolving local device names.
My plan B is to scan the local network, polling each live IP to ascertain the device name. Unfortunately, in those environments where name resolution fails, getCanonicalHostName simply returns a string representation of the IP address. Research reveals this to be a basic flaw in Android’s DNS usage. The question is how to get around it. It’s clearly possible because a third party File Manager is able to list all local server names and IP addresses. I’m guessing this is done by interrogating the IP directly to ask it’s host name. Can anyone suggest how this is done?