Determine device public ip

Parse the public IP address from checkip.org (Using JSoup):

public static String getPublicIP() throws IOException
{
    Document doc = Jsoup.connect("http://www.checkip.org").get();
    return doc.getElementById("yourip").select("h1").first().select("span").text();
}

Just visit http://automation.whatismyip.com/n09230945.asp and scrape it?

whatismyip.com is perfect for getting the IP, though the site requests you only hit it about once every 5 minutes.

UPDATE FEB 2015

WhatIsMyIp now exposes a developer API that you can use.