Get Ip Address Text
import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; class WifiUtil { public static final String getIpAddressText(Context context) { WifiManager wifiManager = (WifiManager)context.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int ipAddress = wifiInfo.getIpAddress(); String strIPAddess = ((ipAddress >> 0) & 0xFF) + "." + ((ipAddress >> 8) & 0xFF) + "." + ((ipAddress >> 16) & 0xFF) + "." + ((ipAddress >> 24) & 0xFF); return strIPAddess; } }