2

I want to get ip adress from url in android.How is it possible?

user3096003
  • 49
  • 1
  • 4

1 Answers1

2

Do this

InetAddress address = InetAddress.getByName("www.google.com"); 
String ip = address.getHostAddress(); 

And make sure you have internet permission.

Robert
  • 2,357
  • 4
  • 25
  • 46