Georgy wrote: > after doing all the research for running a thread in the background in > the EASIEST way, all the leads pointed to asynctask.
Oh, I'm not sure about "easiest", but it's pretty safe. It shifts complexity from runtime thread management to compile-time "how the <bleep> do varargs work in Java again?" issues. All else being equal, I'd rather struggle with the compiler than struggle with odd threading problems. It took me the better part of 9 pages to explain it with an example in the released-but-not-announced Version 2.1 of _The Busy Coder's Guide to Android Development_. But, it may be I'm just wordy. You can grab the source for that from: http://commonsware.com/Android/ Look for the Threads/Asyncer sample project. The canonical example is on the Android Developers blog: http://android-developers.blogspot.com/2009/05/painless-threading.html Note that the current implementation of AsyncTask limits you to a single background thread. It is fairly easy to pull the source for it into your own project and tinker with the java.util.concurrent objects to add threads, change the queue semantics, etc. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

