TEL;TYPE=PREF not respected



  • Hi,

    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.


  • admin

    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:
    BEGIN:VCARD
    VERSION:3.0
    PRODID:-//ownCloud//NONSGML Contacts 0.4.0.0//EN
    N:Guy;Some;;;
    UID:45975c2d-549f-442c-8474-9444f5f1dafc
    REV:2015-09-08T20:28:19+00:00
    FN:Some Guy
    CATEGORIES:Drugari
    TEL;TYPE=HOME:+12 34 56789
    TEL;TYPE=PREF,CELL:+98 76 54321
    END:VCARD

    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):
    BEGIN:VCARD
    VERSION:3.0
    PRODID:DAVdroid/0.8.4.1 (ez-vcard/0.9.6)
    UID:45975c2d-549f-442c-8474-9444f5f1dafc
    FN:Some Guy
    N:Guy;Some;;;
    TEL;TYPE=home:+12 34 56789
    TEL;TYPE=cell;PREF=1:+98 76 54321
    CATEGORIES:Drugari
    REV:2015-09-08T20:29:52+00:00
    END:VCARD

    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.


  • developer

    This post is deleted!

  • developer

    Ok, seems that there's a PREF value of TYPE and a PREF parameter. Currently, DAVdroid only understands TYPE=PREF. Thanks for the hint.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.