Android面试篇之Service和IntentService的区别
来源:互联网 发布:现在开淘宝店赚钱吗 编辑:程序博客网 时间:2024/05/29 12:05
相同点
● IntentService继承自Service,因而两个都是服务
不同点
● IntentService内部开启了一个HandlerThread线程,然后使用此线程的Looper构造了一个Handler对象,在这个线程中执行Handler对象发送的消息。IntentService可以执行耗时任务。普通的Service如果不开启子线程的话是不能执行耗时任务的,会造成ANR。
更多原理,请参考链接 http://blog.csdn.net/kikitious_du/article/details/78800756
阅读全文
1 0
- Android面试篇之Service和IntentService的区别
- Android IntentService 和Service 的区别
- Android中IntentService和Service的区别
- Service和IntentService的区别
- Service和IntentService的区别
- Service和IntentService的区别
- service和intentService的区别
- Service和IntentService的区别
- IntentService和Service的区别?
- IntentService和Service的区别
- Service和intentservice的区别
- IntentService和Service的区别
- Service和IntentService的区别
- Android之IntentService和Service
- android开发步步为营之60:IntentService与Service的区别
- Android开发之Service和IntentService中显示Toast的区别
- Android中Service和IntentService使用区别
- Service IntentService区别 (面试)
- iOS 如何自动移除KVO观察者
- Android Button去掉自带阴影效果
- 配置svn忽略ignore
- 转载(java反射机制详解)
- 秒杀多线程第二篇 多线程第一次亲密接触 CreateThread与_beginthreadex本质区别
- Android面试篇之Service和IntentService的区别
- sublime3插件安装大全
- asp.net得到每月最后一天日期
- CentOS 7.3 安装与配置vsftp
- 使用getBackground().setAlpha,导致其他布局背景透明度都改变的问题
- comapre
- FPGA性能优化--硬件函数优化方法
- 方法二
- java中日期使用毫秒值注意问题