Chapter 14. Broadcast Receivers and Long-Running Services

Through previous chapters, you have been exposed to activities, content providers, and services. We haven't talked much about broadcast receivers, so we will do that in this chapter.

We'll show you first how to invoke a simple broadcast receiver and then extend the idea to invoking multiple broadcast receivers. We will also explore how broadcast receivers can reside in processes outside of the client processes. We will demonstrate how a broadcast receiver can send notification messages via the notification manager.

We will talk about the 10-second limit on a broadcast receiver to respond before the system throws "application not responding" (ANR) messages and suggest known mechanisms to work ...

Get Pro Android 3 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.