Q:-Now a days I am facing problem in getting IP address of android device using programming. Can any one give ma a code for solving that problem. I have already read lot of thread about it but not getting solid answer from that. Please give me any suggesting about it its appreciated.
Thanks in advance.
Q:-Now a days I am facing problem in getting IP address of android device
Share
The problem is that you cannot know if your current in use network device is really has a public IP. You could however check if this is the case but you need to contact a external server.
In this case we can use http://www.whatismyip.com to check (almost copied from another SO question):
To check that this ip is bound to one of your network interfaces:
Test code: