I'm using this to get the internal IP when connected to Wi-Fi:
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
int ipv4intAddress = wifiInfo.getIpAddress();
tempView = (TextView) findViewById(R.id.textViewIPv4Int2);
tempView.setText(myNetworkOperations.iptoDecimal(ipv4intAddress));
Is there a similar simple way to get that IP when on mobile or other type of connection?