[android-developers] Re: Threads for networking and DatagramSocket

2009-07-30 Thread Lex
Thank You for your advice, Roman. There's a detailed post about my issue on the Java Sun Forum: http://forums.sun.com/thread.jspa?messageID=10779608#10779608 Lex On Jul 29, 5:06 pm, Roman roman.baumgaert...@t-mobile.com wrote: I recommend to keep your data communication separate from the UI.

[android-developers] Re: Threads for networking and DatagramSocket

2009-07-30 Thread Dianne Hackborn
Um... it looks like the people there already answered your question: only the receive() call is synchronized, so you can freely send data while your reader thread is blocked waiting for new data to arrive. I don't understand at all why you are suggesting doing networking on the main thread,

[android-developers] Re: Threads for networking and DatagramSocket

2009-07-29 Thread Roman
I recommend to keep your data communication separate from the UI. The UI should be responsive as possible and you don't want to have any blocking on this level. In general data connectivity is not predictable and in worse case you are waiting for a response from the network and blocking your