Accounts

What are DAVdroid accounts and how you can use them to manage and synchronize your server collections (address books, calendars, task lists).

What is a DAVdroid account?

A DAVdroid account represents a connection to a CalDAV/CardDAV service, which can contain address books, calendars and task lists. Most services provide both CalDAV and CardDAV together (technically, this is when both CalDAV and CardDAV can be detected using the same starting point). In this case, you need only one DAVdroid account. However, you can also create multiple DAVdroid accounts for separate CalDAV/CardDAV services.

When you add a DAVdroid account, you need either an email address or a base URL which is used as a starting point for service discovery. You can find the required configuration / base URL in your server manual or admin information. See our tested services for a list of servers/services and how they're used with DAVdroid.

How does service discovery work?

DAVdroid supports both service location discovery by SRV/TXT records and well-known URLs. To use CalDAV and CardDAV in one DAVdroid account, make sure these redirects are present on your server:

/.well-known/caldav → CalDAV service path (302 Found), e.g. /remote.php/caldav/
/.well-known/carddav → CardDAV service path (302 Found), e.g. /remote.php/carddav/

If these redirects are configured correctly, you can use the root URL http(s)://your.server.example/ without any additional paths as the base URL in DAVdroid.

What is the Base URL?

When logging in by URL, DAVdroid asks for the "Base URL". This can be:

So, DAVdroid will query the base URL for both CalDAV and CardDAV and use whatever it finds. If CalDAV and CardDAV are separated on your server and well-known URLs are not configured, you'll have to create two DAVdroid accounts: one for CalDAV (use the CalDAV URL as base URL) and one for CardDAV (use the CardDAV URL as base URL).

Address book accounts

In Android, contacts are assigned directly to accounts, without the possibility of having multiple address books (in contrast to events and tasks, where calendars and task lists are available as grouping entities).

So, DAVdroid defines a new account type "DAVdroid address book" beside the regular DAVdroid account type in order to provide support for multiple address books with one regular DAVdroid account.

For every synchronized CardDAV address book, a DAVdroid address book account is created automatically. When synchronizing "address books" of the main DAVdroid account, DAVdroid starts synchronizing contacts for every DAVdroid address book account.

Do not create, modify or delete DAVdroid address book accounts manually.

Account names

When creating a DAVdroid account, you have to enter the account name. This account name (which will be shown in the DAVdroid accounts list and in Android Settings / Accounts / DAVdroid) is used as the ORGANIZER email address for group-scheduled events. So:

If possible, always use your email address as DAVdroid account name.

During initial resource detection, DAVdroid queries the calendar-user-address-set of the CalDAV principal URL and suggests the first email address as account name. If the property is not available, the user name/email address used for login is suggested as account name.

The account name must be unique, i.e. you can't have two DAVdroid accounts with the same account name. This could be relevant if you need separate accounts for CalDAV and CardDAV. In this case, use your email address as account name for the account to be used for CalDAV and another account name (like "My CardDAV Server") for the account to be used for CardDAV.

DAVdroid address books accounts: They're named after the CardDAV address book which they are connected to, plus a hash of the URL, for instance: My addresses (UA). The hash is necessary when there are two address books with the same name. The address book account names will be shown in your contacts app as possible destinations for contacts.

Refreshing the collection list

To detect new and changed address books/calendars, use the respective menu entry in the DAVdroid account activity. When you refresh the collection list, DAVdroid will search the home sets for new collections and check the already known collections (whether they are still there and whether properties like name and color have been changed). These functions will only be available if a principal and/or homeset URL can be found for the respective protocol.

The collections and their properties (name, color, read-only) are not synchronized to the Android system immediately, but as soon as synchronization is started.

For example, if a calendar's name and color have been changed on the server:

  1. Choose "Refresh calendar list" in the DAVdroid account. Now the new name and color will appear in the DAVdroid account, but not yet in the calendar app (because there was no synchronization yet).
  2. As soon as synchronization is started, the changed properties (name, color) are commited to the Android calendar provider. Calendar apps will now show the new name and color.

Read-only collections

There are two ways to restrict synchronization to one direction (only server to Android):

  1. DAVdroid follows the WebDAV permissions from the server. If you don't have write permissions for a specific collection, it will be treated as read-only.
  2. If you have write permissions for a specific collection, you can force read-only mode ("one-way sync") for this collection using the action overflow. (Note that you have to synchronize a collection before forced read-only takes effect.)

Regardless of why a collection is read-only, it will be shown as read-only () in the DAVdroid collection list.

Android doesn't have native support for read-only address books. To emulate this feature, DAVdroid reverts local changes at every synchronization. Note that you can still edit your contacts in the Contacts app, but all changes will be reverted when the next synchronization is run.

Read-only calendars will be marked as read-only in the Android calendar provider, so that calendar apps won't be able to create/modify/delete events in such calendars anymore. Currently, there's no read-only support for task lists.

Creating / deleting collections from the server

You can also manage collections with DAVdroid.

To create a collection, use the respective menu entry in the DAVdroid account next to "CalDAV" or "CardDAV". For instance, choose "Create new address book" next to "CardDAV" to create a new address book on the server. (This will only work if it's supported by the server, which is not mandatory.) The same applies to calendars and task lists.

To delete a collection, choose "Delete collection" next to the respective collection in the DAVdroid account. This will delete the collection and all its entries on the server, so be careful.

Webcal integration

DAVdroid recognizes Webcal calendars in the calendar home set which are published with resourcetype: subscribed and shows them in the DAVdroid account activity. If you select such a Webcal collection for synchronization, DAVdroid passes the URL to an installed Webcal-capable app like ICSdroid so that this app can subscribe to the calendar.

If you're using ICSdroid, DAVdroid can determine whether a Webcal collection is currently subscribed and can also remove the subscription again.

Account settings

Authentication

User name and password make it possible to change the user name and password used for authentication, for instance when your server password has changed.

Synchronization

Sync intervals: Here you can choose the preferred sync interval for address books, calendars and task lists. If you select "only manually", synchronization is only run on explicit user request. In the other cases, the sync interval is saved in Android settings. Android will run synchronization when local data has been changed (normally very quickly, but in some cases, it may take a few seconds or even minutes) and in regular intervals (given that system-wide automatic synchronization is enabled, permissions are granted, battery saving is disabled for DAVdroid and there is a network connection).

Synchronization is not initiated by DAVdroid itself. DAVdroid relies on the Android content provider framework, which manages synchronization and calls sync adapters like DAVdroid according to its settings (like sync interval). If Android does not call DAVdroid for some reason, there is no way that DAVdroid can synchronize automatically.

Keep in mind that low sync intervals need more battery (although only changed records are transmitted). Sync intervals less than 15 minutes are not allowed by Android 7 and later, because it would use too much battery. If you need up-to-date information in your calendar app, consider a moderate sync interval (like one hour) and using the "Synchronize now" function of your calendar app when you need it.

Sync over WiFi only: If this option is enabled, DAVdroid skips synchronization unless the device is connected to a WiFi network. Note that the Android Accounts view will still show a successful sync even when the synchronization has been skipped (because Android did call DAVdroid, which skipped synchronization, and there was no error). Use WiFi SSID restriction to restrict synchronization to one or more specific WiFi networks. List all allowed SSIDs as a comma-separated list, for instance SSID1,ssid2. Hidden networks and SSIDs with commas are not supported.

CardDAV

Contact group method: DAVdroid supports two very different methods of contact groups:

  1. Groups are separate vCards (vCard 4 method): Groups are saved as separate vCards (group contacts with FN:<group name> and KIND:GROUP) and contain a list of members (MEMBER:uid1,uid2,…). If a member is modified, the group is not affected (unless group membership is changed). If a server does not support vCard 4, DAVdroid uses the vCard 3 properties X-ADDRESSBOOKSERVER-KIND and X-ADDRESSBOOKSERVER-MEMBER instead of KIND and MEMBER.
  2. Group membership is stored in contact CATEGORIES. For instance, if a contact is member of group1 and group2, it would be assigned CATEGORIES:group1,group2. Categories are defined in vCard 3, but using them as contact groups is arbitrary.

Which method should be used depends on your server software (including possible Web interfaces) and your other CardDAV clients. If possible, choose the vCard 4 method. Changing the group method after a DAVdroid account has been set up requires to download all contacts from the server again.

Not all contact group operations are available on all Android devices. See our contact group support table for more information.

CalDAV

Past event time limit: Number of days in the past to synchronize events. For instance, 90 (default value) means that all events since 90 days ago (measured from the current time when synchronizing) are requested from the server (using REPORT calendar-query with time-range filter). 0 means that only events in the future are synchronized. Older events are not kept in the local storage. Events in the future are always synchronized without any limits. You can also leave this setting empty – then all events are synchronized without time limit.

Manage calendar colors: If enabled, DAVdroid takes over server calendar colors to the local calendars at every synchronization. Disable this setting if your server doesn't support colors or if you don't want to use server-defined colors. Then you can use a third-party app to set your local calendar colors. See also How can I change my calendar colors?

Event color support: If set, local calendars are set up so that event colors can be used and synchronized using the iCalendar COLOR property. Disabled by default because some important calendar apps are buggy and crash when event colors are used.

Last updated: 14 May 2018