ITeye博客

Android之IntentService

zhanglibin1986 · 2011-02-09 17:29 · Android · 移动开发 · HTML · 工作 · Blog · .net · Android · Markdown

参考:http://www.wheremylife.com/html/android-intentservice-getting-started/

http://blog.csdn.net/gaojie314/archive/2010/11/28/6040701.aspx

IntentService是一个通过Context.startService(Intent)启动可以处理异步请求的Service,使用时你只需要继承IntentService和重写其中的onHandleIntent(Intent)方法接收一个Intent对象,在适当的时候会停止自己(一般在工作完成的时候). 所有的请求的处理都在一个工作线程中完成,他们会交替执行(但不会阻塞主线程的执行),一个请求会在第一时间执行. 譬如Gallery3D源码中的CacheService.java类

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。