2
我正在開發一個Android應用,該應用使用GData API for Google Calendar in Java連接到Google日曆。到目前爲止,我已經設法創建活動,但我只能設置標題,描述和時間。Google日曆API:新活動屬性
有沒有人知道我可以在哪裏找到一個參考或帶有可設置爲事件的所有參數的示例?
我給你留下了一些我迄今爲止取得的成果的代碼。
CalendarService calendarService = new CalendarService("CalendarAPP");
calendarService.setUserCredentials(<username>, <password>);
URL postUrl = new URL("https://www.google.com/calendar/feeds/<GMAIL ACCOUNT>/private/full");
CalendarEventEntry myEntry = new CalendarEventEntry();
myEntry.setTitle(new PlainTextConstruct("Tennis with Beth"));
myEntry.setContent(new PlainTextConstruct("Meet for a quick lesson."));
DateTime startTime = DateTime.now();
DateTime endTime = DateTime.now();
When eventTimes = new When();
eventTimes.setStartTime(startTime);
eventTimes.setEndTime(endTime);
myEntry.addTime(eventTimes);
CalendarEventEntry insertedEntry = connection.getCalendarService().insert(postUrl, myEntry);
在此先感謝。
Mikywan。