In android we insert an event programmatically through intent. we insert title, description and time . But there is no key found to insert attendee mail id and recipient mail id into a calendar event. If it is impossible, Why is this not possible & If Possible , How do i achieve it?
Brief Explanation of question:
How to pass the mail id of the calendar that to be synchronized into the create event through email?
I have a spinner that shows the list of accounts to be synchronized . Now, as usual passing title,description to create event in calendar application, i use following code.
ContentValues values = new ContentValues();
values.put("calendar_id", 1);
values.put("title", title1);
values.put("allDay", 0);
values.put("dtstart", settime); // event starts at 11 minutes from now
values.put("dtend", cal.getTimeInMillis()+60*60*1000); // ends 60 minutes from now
values.put("description", desc1);
values.put("???????", mail_id);
values.put("???????", participant_mail_id);
values.put("visibility", 0);
values.put("hasAlarm", 1);
event = cr.insert(EVENTS_URI, values);
What should i use to pass the key to insert email id and participant id? Any Help is really appreciated. My screen shot goes below.
Calendar Provider is public since ICS (API Level – 14). More info here
To add attendees you need the event id, so you need to add event first.
Example for API level >=14:
Example for API level < 14: