我可以从我的 android 应用程序将事件写入 Google 日历吗?

Can I write events to Google Calendar from my android application?

我可以将我的应用程序事件写到 Google 日历中,我可以在日历中设置我的事件描述,并设置电子邮件提醒,以便在某个时间收到我的任务邮件吗?

我不需要打开日历 "edit screen",我想设置我 Activity 中的所有数据,并在后台与 Google 日历帐户同步。

是的,你可以。

有网页 APIs 由 Google 修改 Google 日历。因此,您可以从 android 客户端发出一个 http 请求,以执行您想对日历执行的任何操作。

希望对您有所帮助!

可以,您需要使用 Google Calendar API Google has a number of tutorials android

events.insert

页上找到了一个简单的 java 示例
// Initialize Calendar service with valid OAuth credentials
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
    .setApplicationName("applicationName").build();

// Create and initialize a new event
Event event = new Event();
event.setSummary("Appointment");
event.setLocation("Somewhere");

ArrayList<EventAttendee> attendees = new ArrayList<EventAttendee>();
attendees.add(new EventAttendee().setEmail("attendeeEmail"));
// ...
event.setAttendees(attendees);

Date startDate = new Date();
Date endDate = new Date(startDate.getTime() + 3600000);
DateTime start = new DateTime(startDate, TimeZone.getTimeZone("UTC"));
event.setStart(new EventDateTime().setDateTime(start));
DateTime end = new DateTime(endDate, TimeZone.getTimeZone("UTC"));
event.setEnd(new EventDateTime().setDateTime(end));

// Insert the new event
Event createdEvent = service.events().insert('primary', event).execute();

提示:使用calendar.list查找日历 ID。