1. Life cycle:
StartService () mode starts, the service is received by intent and will experience OnCreate () and OnStart (). When the user experiences OnDestroy () when the intent is made to destroy it, the Bindservice () mode starts, and when the activity is bound, it experiences oncreate () and Onbind (), and when the activity is destroyed, The service first calls Onunbind () and then OnDestroy ().
2. Control mode:
The former control mode needs to use a fixed method, a single operation of the service. The latter is bound to the activity, regardless of its life cycle problems, and from the sending intent passive operation, to be able to actively operate the service object, we can even establish a handler class, the service related operations. The flexibility and operability of the service are greatly enhanced.
Summary: For simple application StartService () Start-up mode can bring less code, simple operation. The Bindservice () approach to complex applications, while bringing in more coding, also brings better operability, making it more activity-like.
StartService () and bindservice () differences