A service is an application component that can perform long-running operations in the background and it does not provide an user interface. For example, a service might handle network transactions, play music, perform file I/O, etc., all from the background.
Usually, there are two classes you can extend to create a service: you extend the Service class and override some callback methods, or extend the IntentService class and all you need to do is implement the onHandleIntent() method where you put all the code that should run in the background.
Extending the IntentService class is the simplest way to create a service. If you don’t need to handle multiple requests simultaneously, then this probably is the best option to choose.
In this post we will create a service using the IntentService class.
Well, our service won’t do much. This would be a proof-of-concept application, showing the creation process of…
View original post 161 more words