Supported event fields

DAVdroid implementation of iCalendar VEVENT

Event fields

Events are stored as CalendarContract.Events in the Android calendar provider. These iCalendar properties are mapped to Android fields:

  • SUMMARY ↔ title
  • LOCATION ↔ event location
  • DESCRIPTION ↔ description
  • COLOR ↔ event color (only if enabled in DAVdroid account settings)
  • DTSTART ↔ start date/time, event timezone / all-day event
  • DTEND, DURATION ↔ end date/time, event end timezone / all-day event
  • CLASS ↔ access level
  • TRANSP ↔ availability

All-day events

Events are considered to be all-day events when DTSTART is a date (and not a time). All-day events

  • without end date or
  • with an end date that is not after the start date

are stored with a duration of one day for Android compatibility.

Reminders

VALARM components are mapped to CalendarContract.Reminders records and vice versa.

Reminder methods (ACTION) are mapped to Android values as good as possible.

Recurring events

RRULE, RDATE, EXRULE and EXDATE values are stored in the respective Android event fields. The Android calendar provider uses these fields to calculcate the instances of a recurring event, which are then saved as CalendarContract.Instances so that calendar apps can access them.

Exceptions of recurring events are identified by RECURRENCE-ID. DAVdroid inserts exceptions as separate event records with ORIGINAL_SYNC_ID set to the SYNC_ID of the recurring event and ORIGINAL_TIME set to the RECURRENCE-ID value.

DAVdroid is not responsible for calculating the instances of a recurring event. It only provides RRULE, RDATE, EXRULE, EXDATE and a list of exceptions to the Android calendar provider.

Group-scheduled events

ATTENDEE properties are mapped to CalendarContract.AttendeesColumns records and vice versa.

Events with at least one attendee are considered to be group-scheduled events. Only for group-scheduled events, the ORGANIZER property

  • is imported from iCalendars to the Android event so that only the organizer can edit a group-scheduled event,
  • is exported from the Android event to the iCalendar.

Time zones

DAVdroid is able to process events with all valid time zones (VTIMEZONE). If a certain time zone is referenced by name but no VTIMEZONE component is provided, DAVdroid uses the default time zone definitions from ical4j (Olson DB).

When an iCalendar references a time zone which is not available in Android, DAVdroid tries to find an available time zone with (partially) matching name. If no such time zone is found, the system default time zone is used. The original value will be shifted to the available time zone. For instance, if an event has a start time of 10:00 Custom Time Zone, DAVdroid will use the Custom Time Zone VTIMEZONE to calculate the corresponding time in the system default time zone, let's say 12:00 Europe/Vienna, and then save the event as 12:00 Europe/Vienna.

Because the Android calendar provider can only process events with time zones which are available in Android, recurring events in time zones which are not available in Android and their exceptions may not be expanded correctly.

Event classification

DAVdroid 1.9.1 and newer

CalDAV event classification is mapped to Android's ACCESS_LEVEL like that:

  • no CLASSACCESS_LEVEL = ACCESS_DEFAULT ("server default")
  • CLASS:PUBLICACCESS_LEVEL = ACCESS_PUBLIC ("public")
  • CLASS:PRIVATEACCESS_LEVEL = ACCESS_PRIVATE ("private")
  • CLASS:CONFIDENTIALACCESS_LEVEL = ACCESS_CONFIDENTIAL (currently not supported by most calendar apps, which will reset the access level to ACCESS_DEFAULT or ACCESS_PRIVATE when the event is edited); additionally, CONFIDENTIAL is stored as original value
  • other CLASS value (x-name or iana-token) → ACCESS_LEVEL = ACCESS_PRIVATE; additionally, the value is stored as original value

In the other direction, the locally stored access level is mapped to CLASS like that:

  • ACCESS_LEVEL = ACCESS_PUBLIC ("public") → CLASS:PUBLIC
  • ACCESS_LEVEL = ACCESS_PRIVATE ("private") → CLASS:PRIVATE
  • ACCESS_LEVEL = ACCESS_CONFIDENTIAL ("confidential", if available in calendar app) → CLASS:CONFIDENTIAL
  • ACCESS_LEVEL = ACCESS_DEFAULT ("server default") →
    • if there is an original value: use that value
    • no CLASS otherwise (same as PUBLIC)

Unkown properties

iCalendar properties which are not processed by DAVdroid (like X- properties) are retained (unless they're larger than ≈ 25 kB). When importing an iCalendar, DAVdroid saves all unknown properties as CalendarContract.ExtendedPropertiesColumns records. When the respective event has been modified and DAVdroid generates the iCalendar again, it includes all unknown properties.

Protected properties

These iCalendar properties are processed/generated by DAVdroid and cannot be changed by users:

  • PRODID is set to the DAVdroid identifier
  • UID is used to identify an iCalendar (for new iCalendars, a random UUID will be generated)
  • RECURRENCE-ID is used to identify certain instances of recurring events
  • SEQUENCE is increased when an iCalendar is modified
  • DTSTAMP is set to the current time when generating an iCalendar

Last updated: 06 Feb 2018