我尝试将事件从我的android日历应用同步到默认系统日历。事件已成功同步。但是活动帐户是生日日历。我需要将其更改为普通的电话帐户。可能吗?如果可能的话,我该怎么办?
ContentValues eventContentValue = new ContentValues();
eventContentValue.put(CalendarContract.Events.CALENDAR_ID, 2);
eventContentValue.put(CalendarContract.Events.TITLE, eventTitle);
eventContentValue.put(CalendarContract.Events.DESCRIPTION, "");
eventContentValue.put(CalendarContract.Events.EVENT_LOCATION, eventLocation);
if (stDateTime != null) {
long startTime = stDateTime.getTime();// cal.getTimeInMillis();
eventContentValue.put(CalendarContract.Events.DTSTART, startTime);
}
if (endDateTime != null) {
long endTime = endDateTime.getTime();//cal.getTimeInMillis() + 60 * 60 * 1000;
eventContentValue.put(CalendarContract.Events.DTEND, endTime);
}
eventContentValue.put(CalendarContract.Events.ALL_DAY, 0);
eventContentValue.put(CalendarContract.Events.STATUS, 1);// tentative 0, confirmed 1 canceled 2
eventContentValue.put(CalendarContract.Events.HAS_ALARM, 1);
eventContentValue.put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().getID());