Find ip inside the network [closed]

0
Hello, I'm trying a solution to find a specific computer within a network by an android application, to connect to a webservice in C # ... but the problem is in finding this computer, with the ip changing from time to time . What could I do about it?

    
asked by anonymous 22.05.2017 / 18:50

1 answer

1

It has a class called InetAddress that can help you:

InetAddress endereco = InetAddress.getByName("hostname");
String ip = endereco.getHostAddress();

Reference: link

    
22.05.2017 / 19:37