Ok, to sumarize : My program receive UDP packets. On my HTC Hero (Android 1.5) and on emulator 1.5-1.6, i can't receive UDP packets correctly. They are truncated after the first byte (i receive only 1 byte packets).
No problem in the Android 2.0 emulator On 14 nov, 15:57, Pierre <[email protected]> wrote: > I can reproduce this bug in the Android 1.5 emulator ! > > On 14 nov, 15:26, Pierre <[email protected]> wrote: > > > Please, tell me i'm wrong : > > > It looks that received packet are truncated after "n" bytes. > > "n" is the size of the first received packet. > > > Seriously, this bug make me mad ! > > It only happens on MY phone ! > > > On 14 nov, 13:59, Pierre <[email protected]> wrote: > > > > No problem on the Android 2.0 emulator... > > > I'm testing on 1.5 emulator... > > > > On 14 nov, 01:43, Pierre <[email protected]> wrote: > > > > > Do you know if it's a bug ? > > > > > Is it possible to receive UDP packet on android ? > > > > Is there any example ? > > > > > On 12 nov, 22:27, Pierre <[email protected]> wrote: > > > > > > each time i call receive(), i receive the first byte of the received > > > > > packet > > > > > > On Nov 12, 10:14 pm, Dan Sherman <[email protected]> wrote: > > > > > > > Subsequent calls just block until the timeout? > > > > > > > - Dan > > > > > > > On Thu, Nov 12, 2009 at 3:52 PM, Pierre <[email protected]> > > > > > > wrote: > > > > > > > I receive only the first byte of my udp packet... > > > > > > > > On Nov 12, 8:18 pm, Dan Sherman <[email protected]> wrote: > > > > > > > > We've had issues with UDP packets coming in off the socket > > > > > > > non-reassembled. > > > > > > > > > See what happens with multiple reads, see if you get back the > > > > > > > > expected > > > > > > > > packet length in total... > > > > > > > > > - Dan > > > > > > > > > On Thu, Nov 12, 2009 at 2:16 PM, Pierre > > > > > > > > <[email protected]> wrote: > > > > > > > > > I use Android 1.5 on HTC Hero > > > > > > > > > > My code (udp server on my phone) : > > > > > > > > > > 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()); > > > > > > > > > > Packet length is ALWAYS "1", even if i send larger packets ! > > > > > > > > > I don't understand why ... > > > > > > > > > > When i use Wireshark, i see "normal" packets. > > > > > > > > > > Is it a bug ? > > > > > > > > > This code works on Windows. > > > > > > > > > > -- > > > > > > > > > You received this message because you are subscribed to the > > > > > > > > > Google > > > > > > > > > Groups "Android Developers" group. > > > > > > > > > To post to this group, send email to > > > > > > > [email protected] > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > [email protected]<android-developers%[email protected]> > > > > > > > <android-developers%[email protected]<android-developers%[email protected]> > > > > > > > > > > For more options, visit this group at > > > > > > > > >http://groups.google.com/group/android-developers?hl=en > > > > > > > > -- > > > > > > > You received this message because you are subscribed to the Google > > > > > > > Groups "Android Developers" group. > > > > > > > To post to this group, send email to > > > > > > > [email protected] > > > > > > > To unsubscribe from this group, send email to > > > > > > > [email protected]<android-developers%[email protected]> > > > > > > > For more options, visit this group at > > > > > > >http://groups.google.com/group/android-developers?hl=en > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

