Supported contact fields

DAVdroid implementation of vCard

Name

These vCard properties are mapped to ContactsContract.CommonDataKinds.StructuredName records:

  • FN ↔ display name
  • N ↔ prefix, given name, middle name, family name, suffix
  • X-PHONETIC-FIRST-NAME ↔ phonetic given name
  • X-PHONETIC-MIDDLE-NAME ↔ phonetic middle name
  • X-PHONETIC-LAST-NAME ↔ phonetic first name

These vCard properties are mapped to ContactsContract.CommonDataKinds.Nickname records:

  • NICKNAME ↔ nick name (types are mapped as TYPE x-values)

Phone number

vCard TEL properties are mapped to ContactsContract.CommonDataKinds.Phone records (phone number).

Types like private, work, fax etc. are mapped when possible. Not all vCard values have a corresponding Android value and vice versa. Custom labels are supported.

Email address

vCard EMAIL properties are mapped to ContactsContract.CommonDataKinds.Email records (email address).

Types like private, work etc. are mapped when possible. Not all vCard values have a corresponding Android value and vice versa. Custom labels are supported.

Photo

vCard PHOTO properties are mapped to ContactsContract.CommonDataKinds.Photo records.

Because of Android limitations, contact photos with more than 1 MB can't be stored in the Android contacts provider, so DAVdroid has to resize large vCard photos to the values given by CONTENT_MAX_DIMENSIONS_URI. This limit does not apply in the other direction (Android → vCard).

Organization

These vCard properties are mapped to ContactsContract.CommonDataKinds.Organization records:

  • ORG ↔ company, department
  • TITLE ↔ (job) title
  • ROLE ↔ job description

Messenger / SIP address

vCard IMPP properties are mapped to ContactsContract.CommonDataKinds.Im (messenger account) and – if the URI scheme is sip:ContactsContract.CommonDataKinds.SipAddress (SIP address) records.

Types like private, work etc. are mapped when possible. Not all vCard values have a corresponding Android value and vice versa. Custom labels are supported.

When importing a vCard, X-SIP values are treated like IMPP:sip:… and stored as SIP address.

Note

vCard NOTE properties are mapped to ContactsContract.CommonDataKinds.Note records (note).

Postal address

These vCard properties are mapped to ContactsContract.CommonDataKinds.StructuredPostal records:

  • ADR ↔ street address, p/o box, extended address, locality, region, postal code, country, vCard 4: formatted address
  • LABEL ↔ vCard3: formatted address

Types like private, work etc. are mapped when possible. Not all vCard values have a corresponding Android value and vice versa. Custom labels are supported.

If a vCard doesn't contain a formatted address, it will be generated by DAVdroid in this format:

 

street po.box (extended)
postcode city
region
COUNTRY

Web site

vCard URL properties are mapped to ContactsContract.CommonDataKinds.Website records (Web site).

Types like home, work etc. are mapped when possible. Not all vCard values have a corresponding Android value and vice versa. Custom labels are supported.

Event (birthday, anniversary)

These vCard properties are mapped to ContactsContract.CommonDataKinds.Event records:

  • BDAY ↔ birthday
  • ANNIVERSARY ↔ anniversary

Partial dates without year are supported.

Relation

vCard RELATED properties are mapped to ContactsContract.CommonDataKinds.Relation records (relation).

Not all vCard values have an arbitrarily corresponding Android value and vice versa. Custom relation names are supported.

Contact groups

If the VCard 4 contact group method is set in DAVdroid settings, DAVdroid will use

  • KIND (or X-ADDRESSBOOKSERVER-KIND if the server doesn't support VCard 4) to distinguish between contacts and contact groups,
  • MEMBER (or X-ADDRESSBOOKSERVER-MEMBER if the server doesn't support VCard 4) to store contact group members.

Custom labels

For some properties, custom labels are supported by vCard property groups. For custom labels, the X-ABLABEL property is used like that:

 

BEGIN:VCARD
…
davdroid1.TEL:+123456
davdroid1.X-ABLABEL:My Custom Phone
davdroid2.EMAIL:test@example.com
davdroid2.X-ABLABEL:My Custom Email Address
…
END:VCARD

 

In this example, the phone number +123456 is grouped together with the custom label "My Custom Phone" and the email address test@example.com is labelled "My Custom Email Address".

Unknown properties

vCard properties which are not processed by DAVdroid (like X- properties) are retained. When importing a vCard, DAVdroid saves all unknown properties. When the respective contact has been modified and DAVdroid generates the vCard again, it starts with all unknown properties and then adds the known ones.

Protected properties

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

  • PRODID is set to the DAVdroid identifier
  • UID is used to identify a vCard (for new vCards, a random UUID will be generated)
  • REV is set to the current time when generating a vCard
  • SOURCE is removed because it doesn't apply anymore
  • LOGO, SOUND are removed because retaining them might cause out-of-memory errors

Last updated: 06 Feb 2018

vCard 3 / vCard 4 compatibility

DAVdroid checks whether a CardDAV server supports vCard 4. In this case, vCards are exchanged in vCard 4 format; otherwise, vCard 3 is used.

Some properties are not available in vCard 3. If only vCard 3 is supported by the server, DAVdroid uses these properties nevertheless, but with vCard 3 syntax so that servers can save them as unknown properties.