You Must Enable LocalHost for UDP and Multicast on Android


The MCast and UDP components are used to receive multicast and broadcast network messages, and on Android, proper operation requires explicitly setting the LocalHost property so the application listens on all available network interfaces. To do this, designate the LocalHost property as "0.0.0.0" as shown below:

mcast.LocalHost = "0.0.0.0";

By default, Android devices are not configured to accept UDP multicast or broadcast messages indiscriminately from all sources. Consequently, unless the LocalHost property is explicitly set to "0.0.0.0", the MCast and UDP components will only acknowledge messages that are directly sent to the specified IP address in the LocalHost property.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.