blog.fogdö.net

Android Sync From Hell

by Tina Holmboe 7th of November 2013 (archive)

I’m paranoid. Or so people tell me…:) All from a simple desire to avoid using cloud–based sync services such as Google — or EverNote. I’m quite certain neither is out to do nasty things with my information.

Nevertheless.

Here’s the basic problem: two Android phones. Several calendars, contact and task lists. No desire to expose any of the information to third parties, no matter how benevolent they are perceived.

The information, up until now, has been manually synced. A poor solution indeed.

Luckily «the cloud» is simply a modern buzzword for «a server», and as I run my own little company I run my own little server1.

On this server I can install «groupware» — which is another little buzzword which translate to «software for collaboration». Included is, normally, task–, contact– and calendar–sharing. Perfect.

Exchange

As anyone who do professional work in the IT «biz» ought to know, Microsoft Exchange is possibly the most talked about groupware around — and, note, I carefully does not mention «e–mail» (Exchange and Outlook break so many RFCs it ain’t funny.)

So how about we install groupware, Tine 2.0 say, which can speak Exchange? And set it up to sync with Android? We could. Except …

The native Android «Microsoft Exchange ActiveSync» adapter can sync contacts, calendars, mail and tasks from an Exchange–compatible groupware. It can not accommodate multiple calendars (in Exchange terms: multiple folders).

This means that you can sync, at least from Tine, all calendars to which you have the «sync» permission. It can, however, not differentiate between them: they all end up in the same calendar on the phone. Note that this apply to systems I have tested – Android versions 4.2 and 4.3 specifically, Samsung Galaxy Note 2 and 32.

Contacts and tasks have the same problem.

The alternative, then, is to go Play Store and attempt to find a similar solution. At this point something becomes glaringly obvious: there are no sync adapters3 available, leaving us with dedicated applications. There are quite a few of these.

For example: sync of notes and tasks is very well done by «Tasks & Notes for MS Exchange» by Uniqtec. For calendars, contacts, tasks and notes all in one, «TouchDown for Smartphones» by Nitrodesk work, but is not in the very least userfriendly4.

Neither option integrate with S Planner or, worse, Google Calendar. I’ve omitted quite a few choices — «Exchange ActiveSync for Phones» by Remboa, Inc., for example, as they want USD 2.99 a month.

The built–in ActiveSync adapter integrate with S Planner, mind. Very neat. Neat–er still: if you create a task, say «Shop for groceries» [sic], and add «[!Checklist!]» at the end of the Notes (in Tine; Description in S Planner) section, «Tasks & Notes» will treat the content of the task as a checklist too. Nothing else I’ve tried does this.

Dead end. This is no surprise. Let’s progress.

Cal– and CardDAV

CalDAV, quote, «CalDAV, is an Internet standard allowing a client to access scheduling information on a remote server.» It’s an extension to WebDAV.

CardDAV, quote, « … is an address book client/server protocol designed to allow users to access and share contact data on a server.». This, too, is based on WebDAV.

Importantly: both are based on RFCs – 4791 and 6352 respectively — which makes for good future–proofing.

In addition, CalDAV define that «to–do» is among «calendar objects» that can be synchronised. This makes a certain kind of twisted all–tasks–have–a–due–date kind of sense.

But Android does not have native DAV support — i.e. there is no sync adapter for *DAV shipped with the OS. «Play Store» to the rescue, then. There ought be no surprise that a number of offerings claim to deal in Cal– and CardDAV, nor that quite a few of those are stand–alone calendar and contact applications.

So far I have found two adapters, however; a twin set for CalDAV/CardDAV by Marten Gajda, and one for CalDAV by «GEGE». I have not tested DAVDroid as it has no preview version.

At this point things get very, very peculiar indeed. CalDAV–sync and CardDAV–sync (by Marten G) is commercial. A deep dive in Google’s bugtracker find 'Google Play installs app to /mnt/asec on JB, even though android:installLocation is set to "internalOnly"' which translate to «If you create an account with a sync adapter which you PAID FOR, and reboot, Android will remove the account».

CardDAV–sync and CalDAV–sync require the install of special «workaround apps». It, ahaha, works, but you get four apps to use two accounts.

In addition — and this may be a Samsung bug — the internal contact editor will not change accounts, so you need the separate «Contact Editor Pro» if you wish to move contacts between cloud accounts.

And tasks…. I’m tempted to give up on tasks … first, CalDAV–Sync profess to dealing in tasks, but require a separate, stand–alone, task application to actually manage them. It doesn’t integrate them with S Planner, for example. It does sync with Owncloud and Tine 2, but only ONE WAY. One phone can create and update tasks; the other phone can only read. There are certain hints that this may be a PEBKAC–bug.

«CalDav Sync Adapter», on the other hand, syncs calendars and gets them right. It just doesn’t sync other calendar objects — only events.

It gets worse. Neither CalDAV–Sync nor «CalDav Sync Adapter» can, talking to Tine 2, sync phone–created recurring events. This works with Owncloud — and may be a Tine 2 problem. The Owncloud GUI is a mess; Tine works reasonably.

Solution?

Let’s use both. Android built–in adapter to sync tasks; Owncloud to sync those calendars where recurring events are needed; Tine to sync shared calendars and contacts.

It’s not nearly a satisfactory solution — but it is a solution. Or is it?

The rabbit hole is ever so deep. Remember the bit above regarding contacts editing? It quickly became apparent that when there is an account in place using the built–in Android adapter, the third–party «Contact Editor Pro» can no longer add contacts to the CardDAV account.

I kid you not.

«But!» I hear you cry. «What about the built–in contact editor⁈» Indeed. What about it? It can add new contacts to either the CardDAV account or the ActiveSync one. But it can’t move contacts from one to the other. «Contact Editor Pro» which is specially designed to work with CardDAV can only add or save contacts to the ActiveSync account.

Aha! We’ll use the built–in one! It can’t add birthdays to contact records when syncing with CalDAV servers. «Contact Editor Pro» can, but when synced Tine lose the information. I can set the information in Tine, but then it never arrive on the phone. ActiveSync with «Contact Editor Pro» can set and sync birthdays, but it can’t tell contact lists apart.

I really, really kid you not. Kansas went bye–bye, and there is no pill that can fix this mess; neither red, nor blue, nor octarine.

Final setup:

  • Calendars I: CalDAV–sync with Tine 2.0 for common calendars holding non–repetitive events.
  • Calendars II: CalDAV–sync with Owncloud 5 for calendars with repetitive events…:(
  • Contacts: CardDAV–sync with Tine 2.0; one per contact list. Manually add birthdays to calendar.
  • Tasks: «Tasks & Notes for MS Exchange» with Tine 2.0 for the sublist support

I leave any conclusion to the reader.

References

Collaborative Software
http://en.wikipedia.org/wiki/Collaborative_software
Wikipedia

CalDAV
en.wikipedia.org/wiki/CalDAV
Wikipedia

CardDAV
http://en.wikipedia.org/wiki/CardDAV
Wikipedia

Why Android cannot sync multiple calendars via ActiveSync
http://liquidat.wordpress.com/2013/02/25/why-android-cannot-sync-multiple-calendars-via-activesync/
Roland Wolters, 25th of February 2013

What is Google Sync?
https://support.google.com/a/answer/135937?hl=en
Google Apps

Sync Android Contacts, Calendar, and Files to ownCloud
http://www.slsmk.com/sync-android-contacts-calendar-and-files-to-owncloud/
«Mike», 14th of May 2013

Notes

1 Well, actually, we run quite a few not–so–small servers, but that’s picking nits we can well afford to leave alone! :)

2 For all I know a different Android version, or supplier, have a special, super, fantastic calendar app which can do the sync all on its own.

3 A «sync adapter» is a piece of software which integrate with the Android system and allow, in this case, for the synchronisation of — for example — calendar events so that they become available for all calendar applications.

4 My definition of userfriendly can be summed up as b{2}||!b{2}.

Permanent link to this entry: http://blog.fogdo.net/2013/11/07/07-11-2013-09-07.html