Thanks - worked for me!
TEL;TYPE=PREF not respected
I am using DAVdroid 0.8.4.1 from F-Droid on Samsung S4 (GT-I9505) with stock Android 5.0.1. to sync contacts with self-hosted ownCloud 8.1.1_1.
The problem I’m facing is that TEL;TYPE=PREF is not respected anymore. I say anymore because if I remember correctly, this worked some time ago.
Any chance to make this working?
Thank you in advance.
It works here as expected, I can set pref to certain contacts numbers and it is saved to the vcf correctly and then synced to my server. Maybe Owncloud is removing it or there is a bug that it is not recognized.
If you want us to look closer into this please provide detailed steps to reproduce and send us logs from your phone. Here is a small guide how the logs can be extracted: https://github.com/bitfireAT/davdroid/wiki/How-to-view-the-logs
I meant the other way around. Main reason why I use owncloud and DAVdroid is the ability to sync contacts from owncloud to phone(s).
Creating the contact in owncloud and checking the button next to preferred phone number creates the following vcf which does not make it preferred on the phone:
PRODID:-//ownCloud//NONSGML Contacts 0.4.0.0//EN
TEL;TYPE=HOME:+12 34 56789
TEL;TYPE=PREF,CELL:+98 76 54321
Choosing preferred phone number on the phone and syncing it back to owncloud creates the following vcf (notice the difference between TEL;TYPE=PREF,CELL and TEL;TYPE=cell;PREF=1):
TEL;TYPE=home:+12 34 56789
TEL;TYPE=cell;PREF=1:+98 76 54321
I am just starting to read about vCard formats, and I notice that PREF section of RFC 6350 (which describes vCard 4.0) states that ‘The PREF parameter is OPTIONAL and is used to indicate that the corresponding instance of a property is preferred by the vCard author. Its value MUST be an integer between 1 and 100 that quantifies the level of preference’.
On the other hand, TEL Type Definition section of RFC 2426 (which describes obsoleted vCard 3.0) states that ‘The type can include the type parameter “TYPE” to specify intended use for the telephone number. The TYPE parameter values can include: (…) “pref” to indicate a preferred-use telephone number (…)’.
I guess I need to ask owncloud contacts’ app devs to move to vCard 4.0. Still, perhaps there’s also an opportunity to increase DAVdroid’s conformance to vCard 4.0 standard, as - according to VERSION section of RFC 6350 - DAVdroid should also rewrite VERSION to 4.0: ‘This property MUST be present in the vCard object, and it must appear immediately after BEGIN:VCARD. The value MUST be “4.0” if the vCard corresponds to this specification.’
Thank you for great app, and for help.
This post is deleted!
Ok, seems that there’s a
PREFparameter. Currently, DAVdroid only understands
TYPE=PREF. Thanks for the hint.