@@ -0,0 +1,1019 @@
+package com.kurento.apps.android.content.demo.rtp;%0A%0Aimport java.net.Inet4Address;%0Aimport java.net.InetAddress;%0Aimport java.net.NetworkInterface;%0Aimport java.net.SocketException;%0Aimport java.util.Enumeration;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class NetworkIP %7B%0A%0A%09private static final Logger log = LoggerFactory.getLogger(NetworkIP.class%0A%09%09%09.getSimpleName());%0A%0A%09public static InetAddress getLocalAddress() %7B%0A%09%09try %7B%0A%09%09%09for (Enumeration%3CNetworkInterface%3E en = NetworkInterface%0A%09%09%09%09%09.getNetworkInterfaces(); en.hasMoreElements();) %7B%0A%09%09%09%09NetworkInterface intf = en.nextElement();%0A%09%09%09%09for (Enumeration%3CInetAddress%3E enumIpAddr = intf%0A%09%09%09%09%09%09.getInetAddresses(); enumIpAddr.hasMoreElements();) %7B%0A%09%09%09%09%09InetAddress inetAddress = enumIpAddr.nextElement();%0A%09%09%09%09%09if (!inetAddress.isLoopbackAddress()%0A%09%09%09%09%09%09%09&& (inetAddress instanceof Inet4Address)) %7B%0A%09%09%09%09%09%09return inetAddress;%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D catch (SocketException e) %7B%0A%09%09%09log.error(%22Cannot retrieve local address%22, e);%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%7D%0A

Add class to retrieve local address