I am trying to make a peer to peer chat application on local Network. And I need to find and list the names of online users in a list.
We all know that the function getHostName()
returns us the host name(DNS name) from the INetAddress. In Windows, it returns PC name. But in linux PC and android phones it returns either the IP address or random alphanumeric non user friendly String like android-xxxxxxxxxx (hope you understand). My question is that how can we set the default host name so that the getHostName()
function returns the user friendly name that we set through our application?