如何以编程方式将电子邮件日历事件条目集成到 android 中?

How will to integrate the email calendar event entry in android programmatically?

这里我想以编程方式在日历中创建事件条目,但它应该与 Gmail 事件创建相同。

就像我们可以将 gest 添加到事件中,如果创建者更改了事件,那么通知将转到事件的 gest。

请帮我在 android 上获得这个。

我找到了解决方案,这与将与会者添加到活动中有关。 我们可以将与会者添加到特定活动中,该活动邮件将发送给与会者和组织者,如果活动被编辑或与会者对活动作出回应,也会发送邮件。

将与会者添加到活动

ContentValues values = new ContentValues();
values.put(CalendarContract.Attendees.ATTENDEE_NAME, "Trevor");
values.put(CalendarContract.Attendees.ATTENDEE_EMAIL, "example@gmail.com");
values.put(CalendarContract.Attendees.ATTENDEE_RELATIONSHIP, CalendarContract.Attendees.RELATIONSHIP_ATTENDEE);
values.put(CalendarContract.Attendees.ATTENDEE_TYPE, CalendarContract.Attendees.TYPE_OPTIONAL);
values.put(CalendarContract.Attendees.ATTENDEE_STATUS, CalendarContract.Attendees.ATTENDEE_STATUS_INVITED);
values.put(CalendarContract.Attendees.EVENT_ID, eventId);
getContentResolver().insert(CalendarContract.Attendees.CONTENT_URI, values);

我希望这会帮助你在 android 中得到它。