Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19: Broadcast Receivers and Long-Running Services

Chapter  19

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 how to invoke single and multiple broadcast receivers. We will explore how broadcast receivers can reside in processes outside of the client processes. And we will demonstrate how a broadcast receiver issues notifications.

We will talk about the ten-second limit on a broadcast receiver to respond before the system throws Application Not Responding (ANR) messages and suggest known mechanisms to work around this. We will develop a framework where you can start viewing a long-running service as a special abstraction of a broadcast service, and finally, we'll talk about wake locks in the context of long running services.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint