1.startService
A. There is a sense of starting a thread that is not related to activity after startup.
B. will not be automatically destroyed and need to be destroyed by man (including service after binding)
C. Only one service is started in the thread, and when StartService is called multiple times, Onstartcommond is started more than once, and the OnCreate method is not called
2.bindService
A. A kind of server and client feeling, service for server, activity for client
B. Starting only one service, when Bindservice is called multiple times, does not invoke any method of service. A service is only bound by one activity until the activity calls Onbind
C. When the activity is destroyed, the bound service is also destroyed, with the exception that Activit calls the Onunbind method if the service is started in StartService and calls the Onstartcommond method before the destruction.
And back to true, the service is not destroyed at this time, and when the activity is bindservice again, the Onrebind method is called back to the IBinder, knowing that calling StopService destroys the service
Additional:
Service life cycle diagram:
Android Service parsing