Chapter 11. Exploring Bus-based Communications
In previous chapters, we have been using different techniques to disseminate data/events/notifications between several Android application components (Activity
, Fragment
, Service
, BroadcastReceiver, …
):
- Intents were sent through the system carrying communication messages or notifications to notify a
Service
orActivity
to start - Broadcast Intents were used to report a result back from background processes
- Handlers were used to communicate between different processes and thread executions
These techniques usually involved a tight coupling between the component that sends the message and the component that receives it. Typically, the sender dispatches a message to a certain receiver and deals with the receiver ...
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.