Figure 8.7 Alarm Notification showing in the status bar

In this chapter we have looked at two separate but related items: Notification and Alarm. We have looked at how to use the NotificationManager to generate notifications and how the Notification class can be used to present a Notification to the user by building a simple example that displays a Notification when an SMS messages arrives in the inbox.

We have also looked at how to set an Alarm to cause an application to start or take some action in the future, include waking the system from the sleep mode. Finally we looked at how to trigger a Notification from an Alarm. While the code presented in these simple examples gives you a taste of what can be done with notifications and alarms, both have very broad applications limited only by your imagination.

Now that you have an understanding of how to work with the Notification and Alarm classes, we are going to move on a discussion of graphics and animation. In chapter 9 you will learn the basic methods of generating graphics in Android, how to create simple animations, and even how to work with OpenGL to generate stunning 3D graphics.

Figure 8.7 Alarm Notification showing in the status bar

0 0

Post a comment