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 ...
Get Android™ Tablet Application Development For Dummies® 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.