<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
if(wifi != null)
MulticastLock mcLock = wifi.createMulticastLock("mylock");
I've been doing a bit of research into this, and I believe it is a problem with Android in general, and fixed in or around Android 2.3.7.
It's a bit too anecdotal, but here's what I tested:
- HTC Desire, 2.2, stock: fail
- HTC Desire, 2.3.7, CyanogenMod: success
- Motorola Milestone, 2.1-update1: fail
- HTC Desire S, 2.3.3: fail
- Acer Iconia A501, 3.2.1: success
- Samsung something, 2.3.3: fail
- HTC Legend, 2.2 I think: fail
When I say 'fail', in fact they were all able to send multicast messages to the 'success' devices, but never receive anything back except their own messages - as jldupont describes.