intentservice的用法

intentService与service相比内部开启子线程,把耗时操做放到onHandleIntent方法中,与Activity的通讯使用Binder,没毛病。之后使用到服务直接用intentService就能够啦,省时省力。 PS:service两套生命周期实际开发中合为一套 oncreate() onstartcommand() onBind() onUnbind() onDestroy()
相关文章
相关标签/搜索