On Sun, Aug 15, 2010 at 6:03 PM, Sebastián Treu <sebastian.t...@gmail.com> wrote: >>> Doesn't seem to invoke onCancelled or onPostExecute in my >>> AsyncTask. >> >> Correct. Bear in mind that AsyncTask does not have to be used by an >> Activity. It could be used by a Service, for example. > > This is right? I mean, I re-write code that I wrote as a > Thread/Runnable with an AsyncTask after reading the android dev blog > [0]. Should I re-write it again to be a Runnable? > > > [0]: > http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html
If you are morally opposed to using code that might be used by a Service, then you may wish to avoid the use of AsyncTask. Otherwise, I fail to see why the fact that AsyncTask can be used by both activities and services would be a problem for you. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- 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