O'Reilly logo

Android Application Development For Dummies, 2nd Edition by Donn Felker, Michael Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Seeing Why You Need AlarmManager

The Task Reminder application has one key word in its name — Reminder. The user can set a task title, description, and reminder date and time to be reminded of a task, as in this example: A user adds a couple of tasks in the Task Reminder application (all due later today), puts his device away, and goes about his business. If he isn’t reminded about the tasks, he might forget about them; therefore, he needs a way to be reminded of what should happen — which is where the AlarmManager class comes into play.

The AlarmManager class allows users to schedule a time when the Task Reminder application should be run. When an alarm goes off, an intent is broadcast by the system. Your application then responds to that broadcast intent and performs an action, such as opening the application, notifying the user via a status bar notification (which you can accomplish in Chapter 14), or performing another type of action.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required