Java tutorial
//package com.java2s; //License from project: Open Source License import android.annotation.TargetApi; import android.content.Context; import android.net.Uri; import android.os.Build; import android.provider.CalendarContract; public class Main { private static final String ACCOUNT_NAME = "TUM_Campus_APP"; /** * Deletes the calendar TUM_Campus_APP from google calendar * @param c Context * @return Number of rows deleted */ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public static int deleteCalendar(Context c) { Uri uri = CalendarContract.Calendars.CONTENT_URI; return c.getContentResolver().delete(uri, " account_name = '" + ACCOUNT_NAME + "'", null); } }