I wonder where to place the AsyncTask in the Application? Can I place it in onCreate Method of my Main Activity?
Can anybody please tell me where I can place the Asynct开发者_如何学运维ask method in the Application?
Thanks, david
Look here for a good explanation of how to use AsyncTask
:
http://android-developers.blogspot.com/2009/05/painless-threading.html
It is most convenient to place the AsyncTask
as a private class
(i.e. an inner class) inside the Activity
where you need to use it.
精彩评论