start开启服务的生命周期

* 完整生命周期:onCreate()-->onStartCommand()-->onDestroy()

* 开启服务:onCreate()-->onStartCommand()

* 停止服务:onDestroy()

* 特点:

  1. 服务可以被开启多次,每次开启都调用onStartCommand

  2. 服务只能被停止一

  3. 长期运行在后台

原文地址:https://www.cnblogs.com/loaderman/p/6416147.html