My App creates Notifications as reminders about tasks from a SQLite database that are about to start.
Currently I have a 'Sticky' Service running that checks when the next Notification is due and then use StartServiceAt to schedule when the service must run again. Every time a record is added or edited I also have to check that the StartServiceAt must not be changed. As it is my first attempt at Services/Notifications I am struggling to get it to work 100% accurately, and I was wondering if this is the best option.
Another option would be to have a Service that runs every 60 seconds and creates notifications that would be due in the next 60 seconds. A lot simpler, but not as precise!
Two questions:
1. Any recommendations as to the best option?
2. Would a Service that runs every 60 seconds use a lot of resources, and battery?
Currently I have a 'Sticky' Service running that checks when the next Notification is due and then use StartServiceAt to schedule when the service must run again. Every time a record is added or edited I also have to check that the StartServiceAt must not be changed. As it is my first attempt at Services/Notifications I am struggling to get it to work 100% accurately, and I was wondering if this is the best option.
Another option would be to have a Service that runs every 60 seconds and creates notifications that would be due in the next 60 seconds. A lot simpler, but not as precise!
Two questions:
1. Any recommendations as to the best option?
2. Would a Service that runs every 60 seconds use a lot of resources, and battery?