0
我可以添加和删除新的周期性事件,但是如何使用新的Android日历API编辑/删除重复事件中的一个事件?如果可能的话,我如何更新一个事件的提醒?Android日历API - 编辑/删除周期性系列中的一个事件
问候丹尼尔
我可以添加和删除新的周期性事件,但是如何使用新的Android日历API编辑/删除重复事件中的一个事件?如果可能的话,我如何更新一个事件的提醒?Android日历API - 编辑/删除周期性系列中的一个事件
问候丹尼尔
也许这将帮助:
// First retrieve the instances from the API.
Events instances = service.events().instances("primary", "recurringEventId").execute();
// Select the instance to edit
Event instance = instances.getItems().get(0);
if(youWantToCancel) {
instance.setStatus("canceled");
instance.setReminders(yourReminders);
Event updatedInstance = service.events().update("primary", instance.getId(), instance).execute();
}
if(youWantToDelete){
instance.setId("ToBeDeleted")
service.events().delete("primary", instance.getId()).execute();
}
如果你想删除一个内复发多个事件,只需将IDS像“ToBeDeleted”一些明显的串并执行:service.events().delete("primary", "ToBeDeleted").execute();
请参阅docs
感谢您的回应,它看起来不错,但我还没有时间去测试它,但我让你知道! – DaHanz 2012-01-18 11:14:08
有什么成就呢? – rior 2012-01-19 15:38:49