Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

2. Working with Services > Using the IntentService Class

Using the IntentService Class

Offloading regularly performed tasks to a work queue is an easy and efficient way to process multiple requests without the cumbersome overhead of creating a full Service. The IntentService class (android.app.IntentService) is a simple type of service that can be used to handle such tasks asynchronously by way of Intent requests. Each Intent is added to the work queue associated with that IntentService and handled sequentially. You can send data back to the application by simply broadcasting the result as an Intent object and using a broadcast receiver to catch the result and use it within the application.

Certainly, not all applications require or use a Service, or more specifically an IntentService. However, you may want to consider one if your application meets certain criteria, such as:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial