It can send and receive UDP packets.
Here my code (udp reception) :
Using java Syntax Highlighting
- this.socket = new DatagramSocket(port);
- byte[] array = new byte[500];
- DatagramPacket packetIn = new DatagramPacket(array,500);
- this.socket.receive(packetIn);
- System.out.println("packet length " + packetIn.getLength());
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
My problem : received packets are ALWAYS truncated !
The displayed length is ALWAYS "1" !
When i "spy" packets from my computer (with Wireshark) , they're "normal" (not truncated).
2nd problem : the platform
This bug happens on :
- My HTC Hero (Android 1.5)
- Android emulator 1.5-1.6
I've no problem on Android emulator 2.0 !
http://www.anddev.org/udp_receive_problem-t6886.html
Same problem ?
Please help me, this bug makes me crazy !


