O'Reilly logo

Asynchronous Android by Steve Liles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Long-running Tasks with Service

In Chapter 5, Queuing Work with IntentService, we learned about a specialized subclass of Service that handles its workload on a single background thread.

In this chapter, we'll extend our toolkit by directly extending Service to take control of the level of concurrency applied to our long-running background tasks—how many threads are used to perform the work—and use various methods to send work to Services and receive results from them.

In this chapter, we will cover the following topics:

  • Building responsive apps with Service
  • Controlling concurrency with Executors
  • Returning results with Messenger
  • Direct communication with local Services
  • Broadcasting results with Intents
  • Detecting unhandled broadcasts
  • Applications ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required