How do I get IP_ADDRESS in IPV4 format
问题 I am trying to get the IP address of an device i.e using WIFI or 3G connection. I am getting the ip address in IPV6 format which is not understandable. I want in IPV4 format IP address.I have done google but dint found any proper solutions. here is code which I am using to get IP address of an device public String getLocalIpAddress() { try { try { for (Enumeration<NetworkInterface> en = NetworkInterface .getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement()