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 O’Reilly online learning.

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