[android-developers] Re: Not able to receive UDP Data
UDP works well on emulators and devices. DatagramSocket socket = new DatagramSocket(port); byte[] data = new byte[1000]; DatagramPacket datagram = new DatagramPacket(data, 0, data.length, null, 0); socket.receive(datagram); On 18 мар, 03:20, Miguel Morales therevolti...@gmail.com wrote: I've read people on the internet recommending to use UDP for game networking on Android. However, when I was attempting to implement it using my real G1 device on Tmobile. However, I didn't have any success. I don't really recall having tried it on the emulator, but I probably did. If anyone had any luck implementing a udp server on an Android device, I'd be interesting to hear how. On Thu, Mar 17, 2011 at 5:09 PM, Indicator Veritatis mej1...@yahoo.comwrote: Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG:http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Not able to receive UDP Data
Can you verify this works on a device through a regular carrier signal and not through wifi? On Fri, Mar 18, 2011 at 1:34 AM, emymrin emym...@gmail.com wrote: UDP works well on emulators and devices. DatagramSocket socket = new DatagramSocket(port); byte[] data = new byte[1000]; DatagramPacket datagram = new DatagramPacket(data, 0, data.length, null, 0); socket.receive(datagram); On 18 мар, 03:20, Miguel Morales therevolti...@gmail.com wrote: I've read people on the internet recommending to use UDP for game networking on Android. However, when I was attempting to implement it using my real G1 device on Tmobile. However, I didn't have any success. I don't really recall having tried it on the emulator, but I probably did. If anyone had any luck implementing a udp server on an Android device, I'd be interesting to hear how. On Thu, Mar 17, 2011 at 5:09 PM, Indicator Veritatis mej1...@yahoo.com wrote: Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Not able to receive UDP Data
It worked when I did it with my G2 on T-Mobile. It worked with either one of WiFi or 4G (the carrier's data). But I said to debug on WiFi first, since there you have greater control and transparency: you can run Wireshark and see configuration on more points in the network. If you root your phone, you can even run tcpdump on the phone. On Mar 18, 2:01 am, Miguel Morales therevolti...@gmail.com wrote: Can you verify this works on a device through a regular carrier signal and not through wifi? On Fri, Mar 18, 2011 at 1:34 AM, emymrin emym...@gmail.com wrote: UDP works well on emulators and devices. DatagramSocket socket = new DatagramSocket(port); byte[] data = new byte[1000]; DatagramPacket datagram = new DatagramPacket(data, 0, data.length, null, 0); socket.receive(datagram); On 18 мар, 03:20, Miguel Morales therevolti...@gmail.com wrote: I've read people on the internet recommending to use UDP for game networking on Android. However, when I was attempting to implement it using my real G1 device on Tmobile. However, I didn't have any success. I don't really recall having tried it on the emulator, but I probably did. If anyone had any luck implementing a udp server on an Android device, I'd be interesting to hear how. On Thu, Mar 17, 2011 at 5:09 PM, Indicator Veritatis mej1...@yahoo.com wrote: Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG:http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Not able to receive UDP Data
Great, it's been a while since I played with it because I implemented a reliable and good enough tcp solution. I'll revisit this if necessary to improve performance, hopefully this helps the OP resolve his problem. I was worried that some carriers would not allow UDP to phones, I'll still have to think of the balance between reliability and performance. Thanks. On Fri, Mar 18, 2011 at 6:40 PM, Indicator Veritatis mej1...@yahoo.comwrote: It worked when I did it with my G2 on T-Mobile. It worked with either one of WiFi or 4G (the carrier's data). But I said to debug on WiFi first, since there you have greater control and transparency: you can run Wireshark and see configuration on more points in the network. If you root your phone, you can even run tcpdump on the phone. On Mar 18, 2:01 am, Miguel Morales therevolti...@gmail.com wrote: Can you verify this works on a device through a regular carrier signal and not through wifi? On Fri, Mar 18, 2011 at 1:34 AM, emymrin emym...@gmail.com wrote: UDP works well on emulators and devices. DatagramSocket socket = new DatagramSocket(port); byte[] data = new byte[1000]; DatagramPacket datagram = new DatagramPacket(data, 0, data.length, null, 0); socket.receive(datagram); On 18 мар, 03:20, Miguel Morales therevolti...@gmail.com wrote: I've read people on the internet recommending to use UDP for game networking on Android. However, when I was attempting to implement it using my real G1 device on Tmobile. However, I didn't have any success. I don't really recall having tried it on the emulator, but I probably did. If anyone had any luck implementing a udp server on an Android device, I'd be interesting to hear how. On Thu, Mar 17, 2011 at 5:09 PM, Indicator Veritatis mej1...@yahoo.com wrote: Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Not able to receive UDP Data
Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Not able to receive UDP Data
I've read people on the internet recommending to use UDP for game networking on Android. However, when I was attempting to implement it using my real G1 device on Tmobile. However, I didn't have any success. I don't really recall having tried it on the emulator, but I probably did. If anyone had any luck implementing a udp server on an Android device, I'd be interesting to hear how. On Thu, Mar 17, 2011 at 5:09 PM, Indicator Veritatis mej1...@yahoo.comwrote: Step 1: make sure you can receive TCP. Step 2: open the right UDP ports on your firewall and run Wireshark if you are still not receiving anything. Debug based on what you see.Step 3: get it working on a real phone using WiFi on the same local network as your emulator. If it then fails when you use your phone carrier's data service, the problem is almost certainly their firewall. On Mar 17, 9:19 am, Scott iamavinash...@gmail.com wrote: Hi I am trying to receive UDP data sent from server to my android emulator client. But i am not able to receive the UDP data in my android client application which is running on emulator. packet = new DatagramPacket(buf, buf.length); socket.receive(packet); 1) Can you please let me know how to fix it and receive UDP data on emulator from server application running on some other system. 2) Will i face same problem in receving UDP data if i run my client on the Android hardware/Android based mobile. 3) Will i face similar problem in receving the TCP based data when running the application on the Android Emulator. Kindly pleas guide/help me to get the answers to the above queries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en