I'm trying to implement peer-to-peer communication (device to device) and I need to get the real IP of the server device to then insert into the client but I can not. I'm using:
ServerSocket server = new ServerSocket(8000);
Log.v("TAG", server.getInetAddress().getHostAddress().toString());
and returns me only "::".