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 11: Developing Background Servic... > Notifying the User with Notification...

Notifying the User with Notifications

Now that you've learned how to use services and how to communicate between the UI and those services, a piece is still missing. What happens if your service has new information to share with your activity, but your activity is not the foreground activity?

It would be rude of you to demand that your activity of tweets show up without the user's asking to see it, just because you found new tweets. This is where Notifications are useful. Notifications provide a platform-standard way to unobtrusively notify the user when an application has a change in state. The user can choose when to address these notifications so that she isn't interrupted in her current task against her wishes.

In case you are unfamiliar with them, Notifications are what you see in the expanded status bar (when you swipe from the status bar at the top of your device's screen downward). You can set several properties of a Notification, including the following:


  

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