In the service Onstartcommand (Intent Intent, int flags, int startid) The meanings of these three parameters are, Intent is StartService (Intent Intent) The intent;flags on behalf of flags indicates how the service is started:
Additional data about this start request. Currently either 0, Start_flag_redelivery, or start_flag_retry.
Start_flag_redelivery: If you implement Onstartcommand () to schedule asynchronous work or work in another thread, you may need to use Start_flag_redelivery to have the system resend a intent. This way, if your service is killed when it is processed, intent will not be lost.
Start_flag_retry: Indicates that the service was set to Start_sticky before this token is passed in. The value of Startid is the number of the activity or other entity that is requested for this service, unique.
Meaning of the Onstartcommand method parameter in the Service