I'm trying to figure out a means to collect UDP packets as they come in. I have been able to successfully collect one packet using AsyncTask but it's not clear how to make this happen on an ongoing basis. I cannot see an obvious means to generate a callback when a packet arrives so I assume this is done by some means of polling. I tried using classes like ScheduledThreadPoolExecutor and creating a new thread but in all cases even though I'm trying to access the UDP buffer in another thread I'm getting the exception (cannot recall the exact name but it refers to trying to do network operations on the main UI thread).
One way to make this work would be to run an AsyncTask on a timer but can anyone suggest why I may be having this issue or some ways to make this work. -- 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