搬家后的博客链接: IT客栈 www.itkezhan.org
第一种是通过 startService() 来启动的生命周期
startService() >> onCreate() >> onStart() >> Service 运行中 >> 服务通知停止stopService() >> onDestroy() >> 服务结束
第二中是通过 bindService() 来启动的生命周期
bindService() >> onCreate() >> onBind() >> Service 与客户端通信(Service 运行中) >> onUnbind() >> onDestroy() >> 服务结束