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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Broadcast Receivers > Broadcasting Intents

11.4. Broadcasting Intents

Finally, to trigger the filter, we need to broadcast an intent that matches the action the intent filter is listening for. In the case of BootReceiver, earlier, we didn’t have to do this, because the system was already broadcasting the appropriate intent. However, for TimelineReceiver, the broadcast is ours to make because the intent is specific to our application.

If you recall from Chapter 8, our UpdaterService had an inner class called Updater (see Example 11-7). This inner class was the separate thread that connected to the online service and pulled down the data. Because this is where we know whether there are any new statuses, this is a good choice for sending notifications as well.


  

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