The link "Delete calendar entries" solved my problem deleting all entries in the calendar.
Take a look at the code:
Cursor cursor;
cursor = resolver.query(eventsUri, new String[]{ "_id" }, "calendar_id=" + calendarId, null, null);
while(cursor.moveToNext()) {
long eventId = cursor.getLong(cursor.getColumnIndex("_id"));
resolver.delete(ContentUris.withAppendedId(eventsUri, eventId), null, null);
}
But I want to delete only calendar events starting with an equal text in the description column. Notice: The description only starts with an equal text.
I think the problem is at following line:
cursor = resolver.query(eventsUri, new String[]{ "_id" }, "calendar_id=" + calendarId, null, null);
How can I modify the query to return all rows starting with an equal text (e.g. "This was created by ...") in the description column?