Service生命周期
1、这里要注意service有两种启动方式,startService()和bindService();
第一种:
startService:
onCreate->onStartCommand--(Service runing)-->onDestory
第二种:
bindService:
onCreate->onBind--(clients are bound to service)->onUnbind->onDestory
1、这里要注意service有两种启动方式,startService()和bindService();
第一种:
startService:
onCreate->onStartCommand--(Service runing)-->onDestory
第二种:
bindService:
onCreate->onBind--(clients are bound to service)->onUnbind->onDestory