0
새 일정을 추가 및 삭제할 수는 있지만 새 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();
}
당신이 재발 내에서 여러 이벤트를 삭제하려면이 단순히 "ToBeDeleted"같은 몇 가지 명백한 문자열로 ID를 설정하고 수행 :
감사합니다 다니엘
답장을 보내 주시면 감사하겠습니다. 아직 테스트하지는 않았지만 알려 드리겠습니다. – DaHanz
어떤 성공을 거두고 있습니까? – rior