1

I am thinking of developing an Android app that would, as part of it's function, send-to and receive-from broadcast messages from all devices that are currently connected to a WiFi network.

While a lot of developers have suggested that such a requirement would need the application to acquire the MulticastLock, there are experiences out there that say:

  1. Acquiring the MulticastLock successfully cannot be relied upon since the acquire() method does not return any status on the operation requested.
  2. And even if you do acquire the lock, it's not guaranteed that the WiFi stack does not filter out packets that are not directed at the device.

There are others that say multicastlock works reliably on versions 2.3.3 and above and that the problem of reliability is only for devices running 2.3.2 and below.

Some of them say nothing is guaranteed (now or for future devices) as support for broadcast and multicast is a chipset controlled functionality and that OEMs have the final say. They cite battery drain being the primary motivation for OEMs to either allow or deny software configuration of the chipset.

So, before i delve into my project, i wish to know what the current state of this issue is and if what i am trying to do is feasible i.e no guess work involved. If there is a work around, i am willing to implement that as long as i know it will work reliably. Kindly share your opinions and experiences. Thanks in advance.

VJ Vélan Solutions
  • 6,434
  • 5
  • 49
  • 63

1 Answers1

1

I have used Android apps based on DLNA (like iMediaShare and WDTV Live Media Player) that use multicast for Discovery and Streaming, albeit, this was on JellyBean and not on pre 2.3.3. The apps were able to discover other devices on the network. This could very well be a pre 2.3.3 issue.

Both the apps mentioned above say that their app works with Android version 2.1 or 2.2 and up

  • Thanks @user1102412. After doing some research, i am fairly confident that the firmware version is not the issue as much as the OEMs decision to support multicast functionality in their wifi chipset. I am curious to know if the apps you used worked on HTC-Evo and HTC-Desire devices. Any idea? – VJ Vélan Solutions Oct 07 '13 at 04:31