O'Reilly logo

Android™ Tablet Application Development For Dummies® by Donn Felker

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

Reviewing the Basic Requirements

The idea behind the Task Reminder application is to remind users through the use of an alarm system that a task must be performed. It will allow users to create a list of time-sensitive tasks, and to set a date and time for the app to remind them of these tasks. To fulfill what is expected of it, the Task Reminder application has a few basic requirements:

  • It must be able to accept user input — having a personalized task application that does not allow user input would be silly!
  • Each task must have a reminder date and time in which the user will be reminded of the task.
  • The user must be notified of the task when the reminder time has arrived.
  • Users must be able to delete tasks.
  • Users must be able to not only add tasks but to edit them.

That's alarming! Scheduling a reminder script

For the Task Reminder application to truly work, you need to implement some sort of reminder-based system. As a developer, the first thing that comes to mind is a scheduled task or cron job — methods to handle the scheduled execution of code or scripts in the Windows operating system and the UNIX/Linux operating systems, respectively. Although Android is running the Linux 2.6 kernel, it does not have cron. However, it has the AlarmManager class, which achieves the same thing. The AlarmManager class allows you to specify when your application should start in the future. Alarms can be set as a single-use alarm or as a repeating alarm. You will set the alarm as a single ...

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