forrestguice / SuntimesCalendars

A calendar provider add-on for Suntimes.
GNU General Public License v3.0
32 stars 11 forks source link

Support for notifications #51

Closed Warr1024 closed 9 months ago

Warr1024 commented 1 year ago

Use-Case: I want to be notified of important astronomical events via the calendar app's existing notification mechanism. It does me little good to have events in my calendar if I have to manually poll the calendar to see if anything is happening. While Suntimes itself offers an alarm feature, I want to be able to use the calendar instead in some cases, e.g. for different do-not-disturb handling.

When calenders are added to Google Calendars app, Google Calendars allows configuring "default notifications" for all events that will be added, but all events from Suntimes have already been added with no notifications, so these do not take effect. Removing and readding the calendars doesn't work because it destroys the notification settings.

It seems possible that Suntimes calendar integration will need to provide a UI for configuring notifications, and then import the events with notification settings already baked into each event. It might also work if adding the calendar and adding the events are separate steps, so that users can configure the defaults in the other app first before importing the events.

forrestguice commented 1 year ago

I played around with this over the holiday (probably not everyone's idea of fun ;) It turns out creating reminders is very similar to creating the events themselves. As they are stored in their own table, its relatively easy to add/remove them without having to modify the event.

I plan to work on this again in a few weeks (when there is opportunity), and release it as v0.6.0.

forrestguice commented 1 year ago

I think this is ready. I plan to tag v0.6.0 in the next few weeks.

The changes can be tried before then by building the develop branch, or installing the CI debug apk (from #54 click Checks (tab) -> Android CI (left panel) -> Artifacts (bottom) -> app).