Getting a list of installed calendar in an Android device is relatively easy. This involves using the ContentResolver to query the installed calendars and get a handle to the Cursor for the same. Loop through the cursor to get the id and name for the calendars.


    Cursor cursor;

    // based on the version of android, get the cursor to calendars
    if (android.os.Build.VERSION.SDK_INT <= 7) {
        cursor = getContentResolver().query(Uri.parse("content://calendar/calendars"), 
              new String[] { "_id", "displayName" }, null,  null, null);
    }
    else if (android.os.Build.VERSION.SDK_INT <= 14) {
        cursor = getContentResolver().query(Uri.parse("content://com.android.calendar/calendars"),
                new String[] { "_id", "displayName" }, null, null, null);
    }
    else {
        cursor = getContentResolver().query(Uri.parse("content://com.android.calendar/calendars"),
                new String[] { "_id", "calendar_displayName" }, null, null, null);
    }


    // Get calendars name
    Log.i("Cursor count " + cursor.getCount());

    if (cursor.getCount() > 0) {
        cursor.moveToFirst();
        String[] calendarNames = new String[cursor.getCount()];

        // Get calendars id
        int calendarIds[] = new int[cursor.getCount()];

       // loop
        for (int i = 0; i < cursor.getCount(); i++) {
            calendarIds[i] = cursor.getInt(0);
            calendarNames[i] = cursor.getString(1);
            Log.i("Calendar Name : " + calendarNames[i]);
            cursor.moveToNext();
        }
    } else {
        Log.e("No calendar found in the device");
    }