狗尾草

导航

2012年12月18日 #

(android实战)Service 生命周期和使用注意项

摘要: 一.基础知识服务一般分为两种:1:本地服务, Local Service 用于应用程序内部。在Service可以调用Context.startService()启动,调用Context.stopService()结束。 在内部可以调用Service.stopSelf() 或 Service.stopSelfResult()来自己停止。无论调用了多少次startService(),都只需调用一次 stopService()来停止。2:远程服务, Remote Service 用于android系统内部的应用程序之间。可以定义接口并把接口暴露出来,以便其他应用进行操作。客户端建立到服务对象的连接, 阅读全文

posted @ 2012-12-18 14:07 狗尾草-大数据收割基 阅读(20252) 评论(1) 推荐(2) 编辑