mangstadt/ez-vcard

Relations and Anniversaries are lost in serialization

Closed this issue · 2 comments

Unless I am missing something, the properties relations and anniversaries on the VCard class are completely ignored when the VCF file content is created using Ezvcard.write(vCards).go().

Is this on purpose? Am I using it wrong? I have noticed that also the contact-apps by Google and Samsung seem to lose some data when creating VCF files but I don't see why...

Those properties are only supported by vCard version 4.0. By default, ez-vcard writes vCards in accordance with version 3.0, and it will exclude any properties that aren't supported by this version.

To include the ANNIVERSARY and RELATED properties, you'll need to do one of the following:

Ezvcard.write(vCards).version(VCardVersion.V4_0).go();
Ezvcard.write(vCards).versionStrict(false).go();

Wow thanks a lot for the fast and precise answer :-).
And thanks even more for the nice the and comfortable-to-use library: really appreciate it.