When I get a Message object from my inbox that is an instance of EventMessage (and represents a meeting invitation), the EventMessage object I get when casting from Message has all null properties with the exception of the Subject property. In consequence, I cannot get the Event object after calling EventMessage.getEvent().
public boolean respondToEmailInvite(Message emailInvite) throws ExecutionException, InterruptedException, RuntimeException {
if ((emailInvite instanceof EventMessage) == false)
return false;
CalendarSnippets calendarSnippets = new CalendarSnippets(mOutlookClient);
EventMessage eventMessage = (EventMessage)emailInvite;
String eventId = eventMessage.getEvent().getId();
calendarSnippets.respondToCalendarEventInvite(
eventId
, GlobalValues.USER_EMAIL
, ResponseType.Accepted);
return true;
}
When I get a Message object from my inbox that is an instance of EventMessage (and represents a meeting invitation), the EventMessage object I get when casting from Message has all null properties with the exception of the Subject property. In consequence, I cannot get the Event object after calling EventMessage.getEvent().