在CalendarContract事件创建时自动添加来宾字段

时间:2018-09-12 12:48:11

标签: android google-calendar-api calendarcontract

CalendarContract在将数据插入日历中时自动添加来宾字段,这是完全不需要的。

这是我的代码:

ContentResolver cr = context.getContentResolver();
ContentValues values = new ContentValues();
values.put(CalendarContract.Events.ALL_DAY, 0);
values.put(CalendarContract.Events.DTSTART, startTime);
values.put(CalendarContract.Events.DTEND, endTime);
values.put(CalendarContract.Events.TITLE, title);
values.put(CalendarContract.Events.EVENT_LOCATION, loc);
values.put(CalendarContract.Events.DESCRIPTION, desc);
values.put(CalendarContract.Events.CALENDAR_ID, calendarId);
values.put(CalendarContract.Events.EVENT_COLOR, color);
values.put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().getID());
cr.insert(CalendarContract.Events.CONTENT_URI, values);

enter image description here enter image description here

0 个答案:

没有答案