Service的生命周期

来源:互联网 发布:java把string转为json 编辑:程序博客网 时间:2024/06/06 02:55

1.Call to startService()-----onCreate()-----onStartCommand()-----Service running----(The service is stopped by itself or a client)-----onDestory()


2.Call to bindService()-----onCreate()-----onBind()-----Clients are bounding to service ----(All clients all unbind by calling unbindService)-----onUnBind()----onDestory()