This chapter covers

■ Building an SMS Notification application

■ Using Alarms and the AlarmManager

■ Setting an Alarm

Today's cell phones are expected to be not only phones but personal assistants, cameras, music and video players, instant-messaging clients, as well as just about everything else a computer might do. With all these applications running on phones, applications need a way to notify users to get their attention or to take some sort of action whether in response to a SMS, to a new voicemail, or to an Alarm reminding them of a new appointment.

In this chapter we are going to look at how to use the Android Broadcast-Receiver and the AlarmManager to notify users ofjust these sorts of events. You will learn what a Toast is, what a Notification is, how to use the NotificationManager, and how to display a Notification to the user or trigger some other action. You will also learn how to create an Alarm and use the AlarmManager to schedule your Alarm events. Before we go too deeply into how notifications work, let us first create a simple example application.

0 0

Post a comment