title: How to get Public IP address of the device?
body: <p>Is it possible to get the public IP address of the device using some Java code in Android?</p>
  
  <p>Can I use curl with php to remote server to know the public IP? But I don't know how to use curl in Java.</p>
  
  <p>I need the code for user's country based on the public IP address.</p>
  
  <p>I Only need the code for public ip of the user later see the country</p>