Instructions for the Calendar V3 Android Sample

Warning

This sample is for illustrative purposes only. Please instead use the native Calendar APIs like the Calendar Provider API.

Browse Online

Register Your Application

You first need to register your Android application and sign up for access to the Google Calendar API in the Google APIs Console. First, you need the "Signing certificate fingerprint (SHA1)" for the debug build:

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1
Enter keystore password: android

And for the release build:

keytool -exportcert -alias androiddebugkey -keystore my-release-key.keystore | openssl sha1

Next, register in the Google APIs Console:

Checkout Instructions

Prerequisites: install Java 6, Mercurial (requires 1.6 or higher). You may need to set your JAVA_HOME and ANDROID_HOME.

cd [someDirectory]
hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples
cd google-api-java-client-samples/calendar-android-sample
  

To enable logging of HTTP requests and responses (highly recommended when developing):

adb shell setprop log.tag.HttpTransport DEBUG

Setup Project in Eclipse

Prerequisites: install Eclipse, the Mercurial plugin (optional), and the Android plugin.