I'm fetching a list of Google calendar events.
which event identifier can I get to be able to delete and edit specific event
Here is my fetching code:
private void fetchEvents() {
String[] selection = new String[] { "calendar_id", "title", "description",
"dtstart", "dtend", "eventLocation" };
String projection = "description LIKE ?";
String[] selecionArgs = new String[]{"%/images/%"};
String orderby = "dtstart ASC";
Cursor cursor = getContentResolver()
.query(
Uri.parse("content://com.android.calendar/events"),
selection, projection,
selecionArgs, orderby);
cursor.moveToFirst();
// fetching calendars name
String CNames[] = new String[cursor.getCount()];
for (int i = 0; i < CNames.length; i++) {
nameOfEvent.add(cursor.getString(1));
cursor.moveToNext();
}
}
here I want to delete an event (by the way which type should I use for editing?)
private void deleteCalendarEvent_intent() {
Intent intent = new Intent(Intent.ACTION_DELETE)
//?
startActivity(intent);
}