I trigger the creation of a calendar event through the following piece of code:
Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setData(CalendarContract.Events.CONTENT_URI);
startActivity(intent);
But I would like to specifiy which calendar should be used for the event creation (i.e set the initial value of the calendar dropdown in the event creation screen).
I've tried to provide ACCOUNT_TYPE
, ACCOUNT_NAME
and CALENDAR_ID
intent.putExtra(CalendarContract.Events.ACCOUNT_TYPE, accountType);
intent.putExtra(CalendarContract.Events.ACCOUNT_NAME, accountName);
intent.putExtra(CalendarContract.Events.CALENDAR_ID, calendarId);
but it has no effect on the calendar dropdown initial value.
Is it possible to specify a calendar in the event creation intent?