Android Recurring Calendar
Adds support for EventAndExceptions data objects to AndroidCalendar.
There are basically two methods for inserting an exception event:
Insert it using Events.CONTENT_EXCEPTION_URI – then the calendar provider will take care of validating and cleaning up various fields, however it's then not possible to set some sync fields (all sync fields but Events.SYNC_DATA1, Events.SYNC_DATA3 and Events.SYNC_DATA7 are filtered for some reason.) It also supports splitting the main event ("exception from this date"). Usually this method is used by calendar apps.
Insert it directly as normal event (using Events.CONTENT_URI). In this case Events.ORIGINAL_SYNC_ID must be set to the Events._SYNC_ID of the original event so that the calendar provider can associate the exception with the main event. It's not enough to set Events.ORIGINAL_ID!
This class only uses the second method because it needs to support all sync fields.
Functions
Inserts an event and all its exceptions. Input data is first cleaned up using cleanUp.
Deletes an event and all its potential exceptions.
Retrieves an event and its exceptions from the content provider (associated by Events.ORIGINAL_ID).
Updates an event and all its exceptions. Input data is first cleaned up using cleanMainEvent and cleanException.