Android 7.0 cannot send data
Closed this issue · 5 comments
Android 7.0 cannot send data with IP both "255.255.255.255" and other IPs
Seems it does not work on multicast, either.
Any help / insights? Is there a workaround I could use?
This issue is fixed by https://github.com/netbeast/react-native-udp. @jsdario maybe you can submit a pull request
I believe in Netbeast we are currently using both, netbeast/react-native-udp and this project @v2.0.0 indistinguishbly.
Actually we found weird behaviour only when calling setBroadcast
in Android 7 devices, which aparently is not necessary for it to work, only in Android, so in many ocasions you'll find code like the following:
if (Platform.OS !== 'android') {
socket.setBroadcast(true)
}
This is however counter intuitive and, from my vary basic Linux knowledge, simply wrong. However it did the trick and sockets close normally. It is a huge workaround but I did not research further into the Java side to prove that actually our fork solves it. Initially it just changes how async threads are allocated and applies some styling.
Had this issue. The netbeast updates @flomair mentioned does work well! It's also still backwards compatible at the least back to Android 5.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.