Intent services in Android Part – 4

In this tutorial we learn – What is intent service in android? IntentService is a base class for Services that handle asynchronous requests on demand. It is expressed as Intents. It is triggered using an Intent, it spawns a new worker thread and the method onHandleIntent() is called on this thread. It is work on the separate worker thread.The drawback of intent service is it cannot run tasks in parallel.
– Use of intent service in android? It can be used in long tasks usually with no communication to Main Thread. If communication is required, can use Main Thread handler or broadcast intents. And it is used when callbacks are needed. It is run on the separate worker thread.
– Intentservice example in android??


Leave a Reply

Your email address will not be published. Required fields are marked *