Calendar Changes Coming

To quote the indefatigable Professor Farnsworth, “Good news, everyone!”

Well, for most everyone, anyway.

In a recent post. on the android-contrib Google Group, Dianne Hackborn has indicated that the core Android team is looking at returning the calendar content provider to the Android SDK.

While there are remnants of calendar support still floating around the SDK (e.g., permissions), most of it did not make the cut for Android 1.0. And, as Ms. Hackborn indicates, that was with good reason, since that content provider “has been evolving rapidly”. The core Android team does not put stuff in the SDK unless they are fairly confident that they will be able to support that API over the long haul. All things considered, they have done a good job of that to date.

So, with a heathly dose of luck, we will get two things:

  1. A guarantee that there will be a calendar content provider on every device, just like there is a guarantee that there will be a contacts content provider on every device, and

  2. A documented and supported API for working with that calendar content provider

Bear in mind that Ms. Hackborn made no claims regarding timetable, precise nature of changes, or even that the goal of a supported calendar content provider will come to fruition. All we can do is hope and prepare.

To those developers who failed to wait and are coding to the private content provider: your world is likely to shift. It is at least theoretically possible that the current content provider will be unchanged, but I doubt it. So, be prepared for your code to break. For example, if you do not have one already, you should work on an isolation layer, to help concentrate the places where you will need code changes and to be in position to make runtime decisions as to which edition of the layer you should be using. Pay attention to how people are supporting both the 1.x and the 2.x edition of the contacts content provider, as those techniques should be applicable to your case as well.

Of course, ideally, there would be no apps using the private calendar content provider. Inevitably, some developers will fail to adjust to the changes (e.g., they are no longer supporting the app). That will just lead to more charges of “fragmentation”, though in this case, it was third-party developers who were the cause, not the core Android team, device manufacturers, or carriers. When it comes to fragmentation, we all have our roles to play — if we collectively play by the rules, fragmentation will be a minor issue. The problem is, too many parties think that “play by the rules” is merely what others have to do.


Need Android app development training for your team? Mark Murphy has trained hundreds! Learn more!