Both start and bind will go through to determine whether the Service is created. If it is not created, it will be created (onCreate method execution), and then when a specific method is called, onStartCommand will be called if it is start, and when the stopService method is not called, the The Service will always be in the running state. If it is bind, the onBind method will be called. If the unbindService method is called, the onUnbind method of the Service will be called. At the same time, it will check whether there are other callers of the Service before bind. If so, the Service will not stop. If not, the Service will automatically stop (onDestory callback)
Both start and bind will go through to determine whether the Service is created. If it is not created, it will be created (onCreate method execution), and then when a specific method is called, onStartCommand will be called if it is start, and when the stopService method is not called, the The Service will always be in the running state. If it is bind, the onBind method will be called. If the unbindService method is called, the onUnbind method of the Service will be called. At the same time, it will check whether there are other callers of the Service before bind. If so, the Service will not stop. If not, the Service will automatically stop (onDestory callback)