aditigarg
aditigarg

Reputation: 11

Delete single occurrence of recurring event in blackberry calendar programmatically

I want to know how to delete a single occurrence of recurring calendar event programmatically.

Using eventList.removeEvent(event) deletes the whole series from the calendar.

I have also tried getting enumeration from eventList.items(BlackberryEventList.OCCURRING, startDate, endDate, true) and then deleting the event whose start date and end date is matched but still it deletes the whole series. According to the api this function should return me the first instance of recurring event when I specify true in the last parameter.

Upvotes: 1

Views: 506

Answers (1)

user784540
user784540

Reputation:

Instead of removing event try to update repeat rule of the particular event.

Take a look at the following methods/classes:

setRepeat() method of Event class

RepeatRule class

addExceptDate() method of RepeatRule class

Upvotes: 2

Related Questions