In the previous series of tutorials we have discussed on android service component and seen tutorial on different kinds of services available in android with example they are .
Here in this tutorial we will discuss the difference between these different kinds of service .
Unbound Service | Bound Service | Intent Service |
---|---|---|
Unbounded Service is used to perform long repetitive task | Bounded Service is used to perform background task in bound with another component | Intent Service is used to perform one time task i.e when the task completes the service destroys itself . |
Unbound Service gets starts by calling startService(). | bounded Service gets starts by calling bindService(). | Intent Service gets starts by calling startService(). |
Unbound Service is stopped or destroyed explicitly by calling stopService(). | bounded Service is unbind or destroyed by calling unbindService(). | IntentService Implicitly calls stopself() to destroy |
Unbound Service is independent of the component in which it is started. | bound Service dependents on the component in which it is started. | Intent Service is independent of the component in which it is started. |
5 comments:
Awesome explanation, short and relevant...cheers
Explanation is very goo,short and understandable format
THIS IS UNIQUE
thanks a lot for such nice easy going examples. I wish you include Messenger based service example.
Post a Comment