1

I try to utilize the CalendarContract content provider: http://developer.android.com/reference/android/provider/CalendarContract.Events.html

I only can't seem to find anything regarding exception on recurring events.
I use the Instances URI to query.
I added an event (on calendar.google.com) and made it repeat every day. Now I changed one of the instances' time and the content provider gives me the exception correctly:

// Original event instance:
    eventID: 320
    instanceID: 651
    startdate: Wed Mar 13 09:30:00 CET 2013
    rrule: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
    original_event_id: null
    exrule: null
    exdate: null

// Exception event instance:
    eventID: 333
    instanceID: 888
    startdate: Mon Mar 18 15:00:00 CET 2013
    rrule: null
    original_event_id: 320
    exrule: null
    exdate: null

As you can see above the original event has no exrule and exdate but the exception event is still shown correctly (not overlapping the original event instance)

Now here comes my question: I want to add an exception to a recurring event myself. But I don't know what fields I need to fill and how this works. Since the example above isn't helpful at all.

basvk
  • 4,437
  • 3
  • 29
  • 49

1 Answers1

-1

I was a bit too hasty posting this question. Inserting events to the CalendarContract.Events.CONTENT_EXCEPTION_URI will handle all of this ...

basvk
  • 4,437
  • 3
  • 29
  • 49
  • 2
    Is there any knowledge you can give on how to insert/update/delete using the `CalendarContract.Events.CONTENT_EXCEPTION_URI`? I have been having an issue where whenever I delete a recurring event (using `Events.CONTENT_URI`), all my events disappear on the calendar (the `Instances` table is emptied but the `Events` table remains correct). You can see my question: http://stackoverflow.com/questions/16392410/android-calendarcontract-deleting-a-recurring-event-causes-all-events-to-disapp – penguin egg May 07 '13 at 05:29
  • Plz tell me the way to insert/update/.... in 'CalendarContract.Events.CONTENT_EXCEPTION_URI'. I try many ways but unsccuessful, please my post at http://stackoverflow.com/questions/16915993/make-exception-event-from-original-recurring-event – Tai Tran Jun 04 '13 at 14:26
  • A bit more info would be nice :) – Benoit Apr 25 '14 at 14:29