>I think using an AsyncTask is better. On one hand, it's just simpler
>to implement. On the other hand, it's built in Android and you can be
>100% it's supported and the way Android was designed to work. So,
>rather than using a handler and multiple threads, I find it simpler to
>display the loading dialog in the onCreate() method, do all the work
>in the doInBackground() method of the AsyncTask extending class and
>dismiss the dialog in the onPostExecute(). I don't know about you, but
>I find it a lot nicer.

i put up the progress dialog in the onPreExecute(). the activity can 
then just call execute(), and is otherwise decoupled from the task 
entirely.

i do all my HTTP stuff this way.


-- 
jason.vp.engineering.particle

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