I’ve a serverSocket and I would like to know the IP address, but with
listenSocket.getInetAddress().toString();
I get 0.0.0.0 .
How can I get the IP address, or (if there are two connections enabled) one of them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve used this in the past:
Source: http://www.droidnova.com/get-the-ip-address-of-your-device,304.html