Chapter 5. Interacting with Services

In the previous chapters we focused our attention on the basic, high-level, Android-specific constructs to load data asynchronously on an independent line of execution (background thread); android.os.AsyncTask and android.content.Loader.

What if we want to provide a common set of operations that implement any kind of business logic over a centralized single entity that could be re-used by different clients and has a lifecycle that is not bound to the client lifecycle? By clients, in Android, we mean any kind of UI entity, such as an Activity or Fragment object, a BroadcastReceiver, or any kind of object that wants to exercise business logic.

The solution for this pattern in Android is available in the form of ...

Get Asynchronous Android Programming - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.