If you've developed an application integrated with Google Calendar, you know that you need to periodically poll for event changes to ensure your application stays in sync. Today we’re launching Push notifications for Calendar API. This change makes periodic polling unnecessary. Push notifications significantly reduce the amount of time that the app is out of sync with the server. For mobile devices, this can lead to big savings in data usage and power consumption.

The only thing an app needs to do to get the new push functionality is to subscribe to a calendar of interest. When a calendar changes, we’ll notify your app and the app does an API call to get the update. If you use one of the Google API client libraries it’s very easy to utilize push notifications.

As an example, let’s assume you have a calendar my_calendar@my-host.com. Your app is hosted on a server with my-host.com domain and push notifications should be delivered to an HTTPS web-hook https://my-host.com/notification:

From now on, every time my_calendar@my-host.com changes, Google Calendar server will trigger a web-hook callback at https://my-host.com/notification. All the app needs to do is request an incremental sync as it did before: