我正在根据填写的表单生成日历事件,并且我不使用意图方法,而是通过URI直接插入。突然向参加者发送邀请已停止工作。 这是应该启动邀请的代码的一部分:
ContentResolver atend = getContentResolver();
ContentValues val = new ContentValues();
val.put(CalendarContract.Attendees.ATTENDEE_NAME, "Vet");
val.put(CalendarContract.Attendees.ATTENDEE_EMAIL, vetemail);
val.put(CalendarContract.Attendees.ATTENDEE_RELATIONSHIP, CalendarContract.Attendees.RELATIONSHIP_ATTENDEE);
val.put(CalendarContract.Attendees.ATTENDEE_TYPE, CalendarContract.Attendees.TYPE_OPTIONAL);
val.put(CalendarContract.Attendees.ATTENDEE_STATUS, CalendarContract.Attendees.ATTENDEE_STATUS_INVITED);
val.put(CalendarContract.Attendees.EVENT_ID, eventID);
Uri muri = atend.insert(CalendarContract.Attendees.CONTENT_URI, val);
Log.d("Atendees URI:",muri.toString());
long Aeventid=Long.parseLong(muri.getLastPathSegment());