开发者

Where to place the Asynctask in the Application

开发者 https://www.devze.com 2023-01-19 19:35 出处:网络
I wonder where to place the AsyncTask in the Application? Can I place it in onCreate Method of my Main Activity?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消