I was pretty confused when I found out that the Android emulator does not provide a basic calendar application. Starting with version 4.0 “Ice Cream Sandwich” there seems to be a calendar API, but when developing an application for an older version like 2.2 “Froyo” you not only have no common API for accessing the calendar but also haven’t even got access to a simple calendar application in the emulator. After searching the web for quite some time on how to get a calendar application running on my emulator, I know compiled one myself for Android 2.2. Here’s how to do it:
- First, I set up a complete build environment on a virtual machine running Ubuntu 10.4 64bit (download Ubuntu here) following this guide: Initializing a Build Environment.
- Be sure to download the correct sources:
repo init -u https://android.googlesource.com/platform/manifest -b froyo
- When the download is ready, build the system, but only the needed components:
. build/envsetup.sh lunch full-eng make Calendar make CalendarProvider
- You’ll find Calendar.apk and CalendarProvider.apk in /out/target/product/generic/system/app. Copy them to the machine running the Android emulator.
- Run the emulator and install the APKs:
adb install Calendar.apk adb install CalendarProvider.apk
- Start the application in the emulator.
Download the compiled APKs
- AndroidCalendar.zip (compiled for Android 2.2 Froyo)