1
Google 캘린더 API를 사용하여 일정을 수정하고 싶습니다. 이 예에서 일정 편집 할 수있는 코드가 있었다 :Android에서 Google 캘린더 일정을 수정하는 방법은 무엇입니까?
Entry executePatchRelativeToOriginal(Entry updated, Entry original) throws IOException {
AtomPatchRelativeToOriginalContent content = new AtomPatchRelativeToOriginalContent();
content.namespaceDictionary = DICTIONARY;
content.originalEntry = original;
content.patchedEntry = updated;
HttpRequest request =
requestFactory.buildPatchRequest(new GenericUrl(updated.getEditLink()), content);
return request.execute().parseAs(updated.getClass());
내가 편집 일정을 원한다면 그것은 작동하지만 편집 이벤트와 작동하지 않습니다 내가 가진 예외 : 물론
09-11 17:29:13.516: WARN/System.err(15787): com.google.api.client.http.HttpResponseException: 403 Forbidden
이벤트를 편집 할 수있는 강점이 있습니다. 또한 같은 방법으로 캘린더를 삭제하려면 delete 이벤트가 적용됩니다. 삭제 기능 :
public void executeDelete(Entry entry) throws IOException {
HttpRequest request = requestFactory.buildDeleteRequest(new GenericUrl(entry.getEditLink()));
request.execute().ignore();
}
아이디어가 있으십니까?