If the device is on wifi or other LAN, it doesn't actually know what the network's external IP is. It will have to get that from the router, or from something beyond the router such as your web server.
In this case the device's IP is the internal network IP, it can also find the internal IP of other devices on the network including the routers internal IP but has no direct knowledge of addresses or routing past the routers internal.
http://games.joshkirklin.com/sulium
A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.