Chapter 31
Alerting Users via Notifications
Pop-up messages, tray icons with their associated "bubble" messages, bouncing dock icons, and so on—you are no doubt used to programs trying to get your attention, sometimes for good reason. Your phone also probably chirps at you for more than just incoming calls: low battery, alarm clocks, appointment notifications, incoming text messages, and so on.
Not surprisingly, Android has a whole framework for dealing with these sorts of alerts, collectively called notifications, which is the subject of this chapter.
Types of Pestering
A service, running in the background, needs a way to let users know something of interest has occurred, such as when e-mail has been received. Moreover, the service may need ...
Get Beginning Android 2 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.