开发者

Where to place the Asynctask in the Application

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜