Service

 

 创建一个Service类比较简单 ,只要定义一个类继承Service,覆盖i该类中相应的方法就可以了。

onBind(Intent intent):是必须实现的一个方法,返回一个绑定的接口给Service

onCreate():当Service第一次被创建时,由系统调用 

onStart(Intent intent,int startId):通过startService()方法启动Service时,该方法被调用

onDestroy():当Service不再使用,系统调用该方法。 

posted on 2011-10-19 22:10  猪总的小短裤  阅读(101)  评论(0编辑  收藏  举报