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
https://www.jianshu.com/p/c8dd2cb55b81 https://www.cnblogs.com/ldq2016/p/9035666.html
發佈在我的網站,請訪問:http://kesenhoo.github.io/blog/2013/02/04/android-notes-00-services/
http://processors.wiki.ti.com/index.php/Android-Adding_SystemService