Android: Get Your Phone’s IP Address

public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) { InetAddress inetAddress = enumIpAddr.nextElement(); if (!inetAddress.isLoopbackAddress()) { return inetAddress.getHostAddress().toString(); } } } } catch (SocketException ex) { Log.e(LOG_TAG, ex.toString()); } return null; }

C#: Internet & Networking

The following short pieces of code show you how to: – Ping an IP address – Send an email in .NET with authenticated user (not anonymous email host) – How to do a simple HTTP request using .NET Ping IP //requires .NET framework 2.0 public static string PingIP(string commandStr) { string output = "";   […]