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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.