I\'m trying to receive data from a multicast address, but the call to MulticastSocket.receive() blocks until a timeout takes place. I did some network sniffing and found ou
You need to do something like this
WifiManager wifi = (WifiManager)getSystemService( Context.WIFI_SERVICE );
if(wifi != null)
{
MulticastLock mcLock = wifi.createMulticastLock("mylock");
mcLock.acquire();
}
Reference: http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html