I am wondering how to get a human readable IP Adress from DhcpInfo.ipAddress? The tricky thing about it is, that it is an integer and obviously you can\'t store an IP address in
Use this function NetworkUtils.java \frameworks\base\core\java\android\net)
public static InetAddress intToInetAddress(int hostAddress) {
byte[] addressBytes = { (byte)(0xff & hostAddress),
(byte)(0xff & (hostAddress >> 8)),
(byte)(0xff & (hostAddress >> 16)),
(byte)(0xff & (hostAddress >> 24)) };
try {
return InetAddress.getByAddress(addressBytes);
} catch (UnknownHostException e) {
throw new AssertionError();
}
}