I try to read recurring events on ICS, the startTime of the recurring events are ok, but the endTime is 0 (milliseconds). But just on the recurring events there is the duration not "null". I read on a test event the duration of "P9000S". It is in RFC2445 Format, therefore it is not the duration of a single event, its the duration from first to last event. RRULE gives my following: FREQ=MONTHLY;COUNT=3;BYMONTHDAY=3. How get I the end time of the single events? Thanks a lot in advance! This is my projection:
final String[] projection = new String[]
{ CalendarContract.Events.TITLE, CalendarContract.Events.DTSTART, CalendarContract.Events.DTEND, CalendarContract.Events.RRULE, CalendarContract.Events.ALL_DAY, CalendarContract.Events.DURATION};
EDIT:
final String[] projection = new String[]
{ CalendarContract.Events.TITLE, CalendarContract.Events.DTSTART, CalendarContract.Events.DTEND, CalendarContract.Events.DURATION, CalendarContract.Events.ALL_DAY, CalendarContract.Events.RRULE};
// Construct the query with the desired date range.
Uri.Builder builder = Instances.CONTENT_URI.buildUpon();
ContentUris.appendId(builder, now - DateUtils.DAY_IN_MILLIS);
ContentUris.appendId(builder, now + DateUtils.DAY_IN_MILLIS);
eventCursor = getContentResolver().query(
builder.build(), projection, Instances.CALENDAR_ID + " = ?",
new String[]{""+calendarID}, CalendarContract.Events.DTEND +" ASC");