Android Calendar Api - Edit/delete One Event In A Recurring Series
I can add and delete a new recurring event, but how can I edit/delete one event in a recurring event using the new Android Calendar API? And if it is possible how do I update a rem
Solution 1:
Maybe this will help:
// First retrieve the instances from the API.Eventsinstances= service.events().instances("primary", "recurringEventId").execute();
// Select the instance to editEventinstance= instances.getItems().get(0);
if(youWantToCancel) {
instance.setStatus("canceled");
instance.setReminders(yourReminders);
EventupdatedInstance= service.events().update("primary", instance.getId(), instance).execute();
}
if(youWantToDelete){
instance.setId("ToBeDeleted")
service.events().delete("primary", instance.getId()).execute();
}
If you want to delete multiple events within a recurrence, simply set the ids to some obvious string like "ToBeDeleted" and perform: service.events().delete("primary",
"ToBeDeleted").execute();
See docs
Post a Comment for "Android Calendar Api - Edit/delete One Event In A Recurring Series"