I have to invite multiple members to the google calendar while creating the event and later on when event is created then he can alter the invited member from google calendar .
Here is the code to insert the multiple invitee : but can't able to insert the attendee. but i am able to insert the remaining data.
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
ArrayList<String> al = new ArrayList<String>();
al.add("[email protected]");
al.add("[email protected]");
intent.putStringArrayListExtra(CalendarContract.Attendees.ATTENDEE_EMAIL,al);
intent.putExtra(CalendarContract.Events.EVENT_LOCATION, locationName);
Update google Calendar : Here i am able to update the value of the endTime but attendee is not been updated .
public void updateEvent(long eventID,long endTime,String calendarEventID){
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("content://com.android.calendar/events/" + calendarEventID));
ContentResolver cr = getActivity().getContentResolver();
Uri eventUri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, eventID);
ContentValues event = new ContentValues();
event.put(CalendarContract.Events.DTEND, endTime);
event.put(CalendarContract.Attendees.ATTENDEE_EMAIL, "[email protected]");
cr.update(eventUri, event, null, null);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getActivity().startActivity(intent);
}