[태그:] ip주소찾는방법


  • 안드로이드에서 IP주소 구하기

    public String getLocalIpAddress(){ final String IP_NONE = “N/A”; final String WIFI_DEVICE_PREFIX = “eth”; String LocalIP = IP_NONE; try { NetworkInterface.getNetworkInterfaces(); for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) { InetAddress inetAddress… “read more”