[Howto] Syncing multiple calendars between Android and Zarafa

Android_robotSyncing multiple calendards between Zarafa (or any other groupware) and Android over ActiveSync is not possible due to limitation in Android. However, Zarafa can export calendars via CalDav, and there is an Android apps which adds CalDav calendars to the native calendar system.

Background: ActiveSync and CalDav

ActiveSync is the Microsoft way of syncing data, and is well established in the business ecosystems and thus also in groupware sync solutions like z-push. However, sharing multiple calendars via ActiveSync is not possible with Android without any special hacks. Additionally, ActiveSync is patented and copyrighted and as as result for each device which is able to sync via ActiveSync a fee is payed to Microsoft.

CalDav on the other hand is an open standard for syncing data, available to everyone for free. Unfortunately, it is not natively supported by Android although many groupware solutions provide support for it. But there are 3rd party apps to add CalDav support to Android.

Zarafa

The zarafa support for CalDav is quickly added by installing the zarafa-ical package. Here is for example the package description on a CentOS/Fedora system:

$ rpm -qi zarafa-ical
[...]
The zarafa-ical package includes the Zarafa iCal/CalDAV gateway service
to enable users to access their calendar using iCalendar (RFC 2445/5545)
or CalDAV (RFC 4791) compliant clients. The iCal/CalDAV gateway service
can be configured to listen for HTTP and HTTPS requests.

The configuration is done in /etc/zarafa/ical.cfg. The only really interesting part is if you want to enable ical over TLS or not. After everything is set up, try to reach the calendars of your system via web browser, the address should look similar to https://www.example.net:8443/caldav/testuser/Calendar. Afterwards, create some more calendars to verify later on that everything worked.

Many other groupware solutions offer CalDav support as well, the setup should be equal similar. The beauty in CalDav is that it does not contain any special magic.

Android

Once Zarafa is set up, you can configure the Android client. As mentioned before, Android does not provide native CalDav support, thus a 3rd party app is required. I made quite good experiences with the app CalDav sync beta. While the app does cost 2,55 €, the author does promise to open source the app once it has matured enough.

After the app was installed, you just enter user credentials and server URL and are ready to go:
Screenshot_2013-02-23-01-12-31

The synced calendars show up in the Android calendar overview natively, and can be re-used in any calendar app out there which accesses the default Android calendar store:
Screenshot_2013-02-23-01-13-18

That’s it, you can now sync all calendars you want, even carious task lists, to your Android mobile phone. It works pretty well for my own Zarafa setup, but we’ve also tested it at credativ with dedicated calendar server in a productive environment.

Conclusion

As a result, the sync between multiple calendars in Zarafa and Android does work now flawlessly. An additional bonus is that you are free to choose the colors of the calendars, in contrast to the ActiveSync implementation where you are stuck with a random color. :)

Besides, CalDav is also implemented in groupware fat clients like Thunderbird, KDE’s Kmail and Gnome’s Evolution, and you can now access all data via the same interface.

About these ads

8 thoughts on “[Howto] Syncing multiple calendars between Android and Zarafa

    1. You do realice that I did use the apps from dmfs, right? ;-)
      But nice to hear that the Akonadi DAV resource works, haven’t tested it so far.

  1. Hi, I use CalDAV sync with ownCloud as well, and I am curious about “An additional bonus is that you are free to choose the colors of the calendars”. I can’t find a way to define the colors on my Android devices, how did you do this?

    1. Aurélien, all I had to do is going to the CalDav sync account, choose “edit account settints”, pick the appropriate account and choose “selsect calendars to sync”. There you have the list of calendars to be synced, and you cn long-press on any calendar to change the color. It says even so on top of that page ;-)

    2. Just tried it, but when I click “select calendars to sync”, I get a brief flash, as if a new page is loading, and it goes back to the “Sync settings” page. I guess this is because I only have one calendar. Time for a bug report… Hopefully in the future my calendar will escape from that ugly brown color :). Thanks for detailing the steps.

Comments are closed.