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

Summary

In this chapter, we explored the very powerful Service component, putting it to use to execute long-running background tasks with a configurable level of concurrency.

We learned that running tasks in a Service gives them the best possible chance of successful completion if the user exits the application, because the system avoids killing processes with active Services unless absolutely necessary.

We discovered various ways to initiate background work in a Service, from starting the Service with an Intent object through to direct method invocation using local Services.

We also saw the wide range of communication mechanisms available for delivering results back to the user: direct invocation of local Service methods; sending Messages with ...

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