Jump to content

Focus 3 not receiving UDP broadcasts


AegisDeveloper

Recommended Posts

My questions:
Does the Focus 3 support UDP broadcasts at all?
If so, how do we enable it?
If it is enabled but still not working, is it possibly a C# UdpClient issue on the Focus 3? Or is it a Unity thing?

We are working in Unity, and have custom C# networking libraries (based on UdpClient) that we've used in Windows-based products for years. This code relies on UDP broadcasts for some features to work properly. Using these libraries in an Android build, the Focus 3 is able to send broadcast messages but does not receive them. I have searched the topic of UDP broadcasts on Android extensively, and applied all of the changes found, but it's still not working. I did run into one forum thread where it was found that the kernel for a particular phone did not support broadcasts. That made me wonder if that's what is happening here. Does the Focus 3 support receiving UDP broadcasts?

Socket options set:
SocketOptionName.ReuseAddress = true
SocketOptionName.ExclusiveAddressUse = false
SocketOptionName.Broadcast = true

Added permissions to manifest:
android.permission.ACCESS_NETWORK_STATE
android.permission.CHANGE_NETWORK_STATE
android.permission.INTERNET
android.permission.ACCESS_WIFI_STATE

Added code to acquire manifest lock
Derived from the discussion here https://answers.unity.com/questions/250732/android-build-is-not-receiving-udp-broadcasts.html

Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...