I’ll find you…
public String getIp() {
URL whatismyip = null;
BufferedReader in = null;
try {
= new URL("http://checkip.amazonaws.com");
whatismyip = new BufferedReader(new InputStreamReader(
in .openStream()));
whatismyipString ip = in.readLine();
return ip;
} catch (IOException e) {
.printStackTrace();
e} finally {
if (in != null) {
try {
.close();
in} catch (IOException e) {
.printStackTrace();
e}
}
}
return null;
}