Yes, that's the more usual pattern.

You'll still likely need an activity reference to show progress and display results, but there are special methods in AsyncTask for that, which are automatically called on the UI thread - thus, you'll be avoiding multiple threads trying to access and modify the activity member variable (the original issue with your code).

-- Kostya

27.10.2011 15:33, Bluemercury пишет:
What about extending the async task and then implement the logic directly in the doInbackground method? --
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

--
Kostya Vasilyev

--
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

Reply via email to