I am working on an app that reminds users of actions based on the preferences that they set. They can set a start date and an end date (the end date is optional). Then they can set the frequency:
- Daily
- Weekely
- Every 1-9 Days
- Every 1-9 Weeks
- On certain days of the month
- Specific Dates
Now, I need to be able to retrieve a list of the upcoming and past reminders to show in a UITableView. And if the user ignores the notification (do not check off the reminder in the app) then I need to be able to keep track of this as well for mathematical computation later on.
First I had the idea for the UITableView to just look at the reminders set and figure out what notifications would fire on any given day.
This would take a lot of computation with dates, and would not allow me to know if a user ignored the reminder.
My next (and current) idea is to store a database table (like below) and enter in a month in the future of reminders. And any rows that are not set to responded to mean that they ignored it. This would also make the UITableView very simple to do.
Are there any better ways of doing this? How far in advance should I create the database rows? If they change the reminder, I am going to have to probably call DELETE on the rows and re-enter them; will this be ok to have really high number in terms of id's?
reminderLogs
-------------
id
reminderID
actionReceived
timestampShould
timestampTaken
comments