Smelly Eddie wrote: > You should not be spawning threads yourself, as it is against Android > best practices.
I wouldn't say that. There are plenty of scenarios in which you need to manually create threads: -- need finer-grained control over a thread pool than AsyncTask offers -- waiting on server sockets -- handling your own event loop in a game > Instead look at ASyncTask, which provides methods for > pre-execute, onUpdate, and postExecute, and are automagically handled > by the Activity manager, so you don;t need to worry about killing > them in this manner. There is no question that AsyncTask and IntentService are very useful and, all else being equal, are probably the correct choice. However, I would not say that forking your own threads is against "Android best practices". In the specific book example the OP was inquiring about, I show manual thread management, just before showing AsyncTask. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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

