FastMail CardDAV and groups



  • http://blog.fastmail.com/2014/12/22/carddav-beta-release/

    Today FastMail added (beta) support for CardDAV, and it seems to work fine with DAVdroid, except for one thing; groups.

    I'm using a custom Android 4.4.4 ROM (AOSPA) with the patch mentioned in issue #48:
    https://github.com/AOSPA/android_packages_apps_ContactsCommon/commit/574b9c7d6a37b32b1c038fa4a1e23fa6a37b518f

    It might be something that my contacts/dialer app doesn't support properly either, so if you can point me in the direction of one that is confirmed to support groups properly I'd test that as well.


  • developer

    DAVdroid only understands VCard 3 (all CardDAV clients MUST understand VCard 3, but MAY understand more recent versions like VCard 4). In VCard 3, there's no dedicated groups support, so DAVdroid uses the CATEGORIES tag (like OwnCloud). Possibly FastMail uses another method to indicate groups, like iCloud or other services do.

    So I can only say that groups using other methods then CATEGORIES are not supported by DAVdroid at the moment.


  • admin

    In our Fastmail test account only the calendars work. The logs say that we're unauthorized to use the CARDDAV server. Do your contacts work? Other apps we tried didn't work either with our username.

    I've contacted the fastmail support already.



  • The contacts themselves work just fine, adding/removing/changing syncs as expected, it's just the groups that doesn't work.

    Keep in mind that since this is a beta feature of FastMail, you have to activate it on your account, as highlighted in the blog post. Here's the direct link: https://www.fastmail.com/go/carddavbeta


  • developer

    The contacts themselves work just fine, adding/removing/changing syncs as expected, it's just the groups that doesn't work.

    Yes, because they are probably not implemented using CATEGORIES. This is not a fault, it's just that they don't (seem to) implement groups (which are not standardized in VCard 3) the same way as DAVdroid.



  • I inqueried one of the developer/support staff over at FastMail about this as a part of a conversation about CardDAV support's launch, and I expect to get an answer in the next few days, although the holiday season might delay this.



  • Hi, I'm the main CardDAV developer at FastMail.

    We support the Apple (iCloud/iOS) way of doing groups. That is, a group is a separate card of the form:

    BEGIN:VCARD
    VERSION:3.0
    FN:some group
    UID:5d44352e-7506-4e7c-b573-2d723cd7b520
    X-ADDRESSBOOKSERVER-KIND:group
    X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:8b7e4936-ada9-4f1c-b739-71425ab53049
    X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:796bc1c5-67ef-4ed4-affc-a226d0b6125a
    END:VCARD
    

    The decision to implement it this way is more of a practical consideration than anything else - iOS is by far our largest CardDAV client out there, so we need to make sure it works. Our recommended Android client is CalDAV-Sync, which also handles this just fine.

    If you can give me information about your CATEGORIES method of implementing groups, I'd be happy to look into it further. Whether we implement it or not will be based on how "standard" it is, how widely deployed it currently is and how sanely it will play with other group schemas and with our web client. Any information or links you can give me that will help inform this decision would be very much appreciated.



  • http://tools.ietf.org/html/rfc6350#section-6.7.1

    It's a simple property within a contact, where the value is a comma-separated list of group names. I suppose both the iCloud-variant and this one can be supported in parallel.

    Example:
    
           CATEGORIES:TRAVEL AGENT
    
           CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY
    

  • developer

    It's a simple property within a contact, where the value is a comma-separated list of group names. I suppose both the iCloud-variant and this one can be supported in parallel.

    DAVdroid only supports CATEGORIES, but not the "iCloud variant". Many services don't (mis)use CATEGEORIES for groups but use the VCard 4 "iCloud" variant.

    Implementing the VCard 4 method into DAVdroid is absolutely not trivial -- high-quality pull requests are welcome.



  • DAVdroid only supports CATEGORIES, but not the "iCloud variant". Many services don't (mis)use CATEGEORIES for groups but use the VCard 4 "iCloud" variant.

    I meant on the server side. Also I am not sure why you would call the way iCloud does it a "vCard 4 variant"? CATEGORIES is apparently part of vCard 4, while the example @robn posted was version 3.



  • Also I don't understand why this would be a misuse of the CATEGORIES field.



  • Ahh, so its more of a tagging system. Interesting. Are any other clients using it for groups? Are there any clients that are using both categories and Apple's method? I will do my own research for this when I get time (Christmas!) but maybe you know off the top of your head.

    I don't think its easy for FastMail to support because our groups are discrete objects with a unique ID and various properties that allow them to be used for different things (spam whitelists, distribution lists, etc). There's potential for groups and their members to become decoupled if the name of a group changes. Duplicate names present obvious problems. There might also be fidelity issues if a user has multiple CardDAV clients accessing the same store, though we already have that problem.



  • There's potential for groups and their members to become decoupled if the name of a group changes.

    I don't know your system (obviously), I was thinking about a system where the CATEGORIES property would be generated on CardDAV request, i.e. the group UID (which is actually stored alongside the contact) is resolved to a name every time. That would mean every contact in a group changes if the group gets renamed though.



  • Ahh, now I'm reading the specs further. The iCloud way is the v4 way, just with X- prefixes. Given that fact and the difficulties I outlined above, I think its unlikely that we're going to make any particular effort to support CATEGORIES-based groups.



  • I was thinking about a system where the CATEGORIES property would be generated on CardDAV request

    Yeah that could work, but its extra overhead and still does nothing for duplicate names and fidelity issues.



  • The iCloud way is the v4 way, just with X- prefixes

    Oh, this does clear things up for me.


  • developer

    So I'll close this here, because at the moment, DAVdroid only supports groups via CATEGORIES. When VCard 4 support arrives (this may take a while), it will probably support VCard 4 groups, too.



  • Hi!

    Any news on this issue? I see VCard 4 checkbox in the settings, but it doesn't work. So the issue with Groups is still there. My DAVdroid version is 0.8.2 from F-Droid.

    BTW, no other issues with FastMail.


  • admin

    We have to make a lot of changes to the code of DAVdroid to get vcard4 groups in. So this will still take some time.

    The "checkbox" is actually not an option :-) It only displays what vcard version the server uses, but has nothing to do with how DAVdroid processes data.


  • admin

    DAVdroid has made great progess in the last months. We've now introduced the currently best supported CardDAV groups for Android. This works very nice with a lot of providers, of course also with Fastmail. DAVdroid now supports many different ways of groups (VCard 3 and 4) and also combinations.


Log in to reply
 

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