There is a bug in java that will cause things like setting the TTL on UDP multicast to fail if you have both ipv4 and ipv6. This lets you work around that by disabling ipv6.
Install the plugin
$ cd ipv6_disable
$ cordova plugin add https://github.com/jontaylor/cordova-disable-ipv6
Install Android platform
cordova platform add android
Run the code
cordova run
For more information on setting up Cordova see the documentation
For more info on plugins see the Plugin Development Guide