Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid not receiving broadcast UDP, but receiving directed UDP
    primarykey
    data
    text
    <p>I'm having an issue where my Android device (An HTC Incredible running stock 2.3.4 rom) is not able to receive a broadcast UDP, but when I get the IP of the device (on the same network) and send the packet directly to the IP, the phone immediately recognizes it and interprets it. I have tested with WireShark on two unrelated PCs, one not even on the same switch on this network, and both are able to see the packet (though they do call the packet "malformed") Yet the phone never receives (it doesn't require any data from the packet) so I'm wondering what's happening.</p> <p>The same thing is happening in the emulator as well. </p> <p>This is the current code. </p> <pre><code> m_UDPSocket = new DatagramSocket( 9000 ); m_UDPSocket.setBroadcast( true ); // unneeded? boolean finished = false; byte[] buf = new byte[1024]; DatagramPacket packet = new DatagramPacket(buf, buf.length); m_UDPSocket.setSoTimeout( 1000 ); do { finished = true; try { m_UDPSocket.receive(packet); } catch ( SocketTimeoutException e ) { finished = false; System.out.print( "Socket recieve timed out" ); } } while( finished == false ); System.out.print( buf ); InetAddress address = packet.getAddress(); </code></pre> <p>So is my phone rejecting the UDP broadcast packets for some reason, any way to test that it is receiving the packet on my phone? Is this the HTC Incredible issue <a href="http://code.google.com/p/android/issues/detail?id=8407" rel="nofollow">HTC issue</a> , and I need to program around this? </p> <p>Thank you in advance for any help you can give me on this matter. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload