android calendar and CalDav

21 jun 2016

motivation

2016 and android still does not have a built-in open source CalDAV/CardDAV, this article is a very interesting read on the history and reactions of people wanting that. there is a nice article on how to implement a CalDAV client.

so in a nutshell: syncing different devices while supporting offline capabilities is complicated.

long story short: i do not want to copy my data into the google cloud. in this this posting i want to share my results with using owncloud 8.2 to sync my calendar and address book between my desktop computer and android (cyanogenmod) mobile.

owncloud/PIM

used components:

results

what i liked:

  • have my own infrastructure
  • many components are open source

what i hate:

  • lots of manual deployemnt and configuration
  • android
    • battery drain on android: 4 programs periodically pull for updates

    • if owncloud can’t be reached aCalDAV will always set a notification with an error, see issue 17

  • laptop: thunderbird’s CalDAV implementation
    • focus stealing warning popup-dialog is displayed once in a while -> very annoying, see issue 1287332

      to reproduce this:

      1. shutdown your owncloud server

      2. start thunderbird

      3. add a new event in the calendar and see thunderbird-> tools -> error console

         Timestamp: 21.06.2016 15:01:54
         Error: An error occurred when writing to the calendar http://192.168.0.86/owncloud/remote.php/dav/calendars/joachim/default/! Error code: MODIFICATION_FAILED. Description: 
         Source File: resource://calendar/modules/calUtils.jsm -> file:///home/joachim/.thunderbird/hy2x4cxy.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
         Line: 959
      4. see the dialog

      5. restart thunderbird, see it once in a while

      6. once owncloud is connected and synced, the ‘added and cached’ event is synced and the message will not appear anymore

  • laptop: thunderbird’s CardDAV implementation interacts stangely with the SoGo connector, that is:
    • don’t try mass-moving of your contacts from the offline-address books into your owncloud address book. with old versions you might hit this bug
    • address book can only be editited when SoGo connector can communicate with owncloud, no offline functionality
    • sometimes one deletes an entry in the address book, it vanishes, appears again and finally vanishes forver …?

conclusion

i love this setup even as is a bit fragile! k9 mail is a great client, has even a better thread view than thunderbird. etar is exactly the calendar app i wanted! owncloud 8.x/9.x is currently packaged in nixpkgs but is broken. next up: fix the owncloud package(s) on nixos/nixcloud and use that instead of ubuntu 16.03.

article source