Tuesday, May 04, 2010

Google, where is the calendar API in Android?

We are in the middle of a lot of debates these days: is Apple the new Microsoft? Is Microsoft following Apple with Windows Mobile 7? Should HP open source WebOS (more on another post, my answer is yes)? Is Google Android open or closed?

I have been bashing Apple for months (years?) because of the lack of Calendar API on the iPhone. It was a very large visible sign of closeness on their part. A lot of apps need to create an event on the calendar (thing anything medical, where you need a reminder) and the lack of API access was hard to comprehend.

Now Apple finally opened the calendar API with iPhone OS 4. Curiously, though, if you download and install the emulator, the API is not there yet. But one can only be optimistic: they have documented it, presented on stage, it is going to show up one day... That day, we'll start developing for it...

I was quite happy we finally had a chance to build the calendar sync on the iPhone and iPad, when I received a note from one of our developers. The email explained we had problems building calendar sync for Android. They added that the reason was that there is no public calendar API on Android.

Whaaat? No calendar API on Android?? Are you kidding me????

Unfortunately, developers do not lie, so it is true (had I heard it from a marketing person, it would have been quite different ;-) There is no public calendar API on Android. Unbelievable.

Wait, but Android is open source, right? You could download the calendar client, compile it, put it on the emulator (which does not ship with it), add the data provider and you would be good to go. No need for public APIs when you have access to the source code.

Right?

Wrong...

You can do all that, and it works pretty well when you just read the calendar. However, as soon as you try to write to it, creating a new calendar, Google gets upset. At the next sync with Google Calendar on the cloud, any calendar that is not on the Google servers gets wiped out on the device. Not nice. Not nice.

Any other option? Yes, one is to create a calendar in Google and write to it on the device, ultimately doing double sync (one in Google Calendar, one in your Funambol server). It is like double dipping, though, and the likely effect is spreading duplicates instead of germs. Bad idea (but we are going to explore it).

On top of it, I have no idea what happens with devices that ship with a modified UI, such as MOTOBLUR or the HTC Sense UI. I guess the behavior might be different: yep, I know, I said once that fragmentation is innovation, maybe I was wrong :-))

Overall, I am a bit shocked. An operating system that is meant to be open and one of the most basic APIs is closed... Is Android open or closed? You pick ;-)