08-06-2009 03:40 AM
I am developing a BlackBerry JAVA application that needs to retrieve, add, update and delete events in BlackBerry Calendar. I use EventList, BlackBerryEvent classes to do this. I can successfully make required actions with non-recurring events and with recurring events without exceptions (exception is a changed occurence of recurring event). But:
1) I did not find any solution to create recurring event with exceptions;
2) How to determine that event is an exception? How to find for which recurrent event this exception was created?
It looks like java has no means to do this...
Any Help will be appreciated.
08-06-2009 04:28 AM
08-06-2009 05:01 AM
08-06-2009 05:17 AM - edited 08-06-2009 05:19 AM
I guess exceptions are hard to predict in advance it is much easier to see conflicts once the event exists. Bedework offers the option of setting exceptions during event creation, but the UI is hardly intuitive. Which i think is the real reason how do you easily manage 50 events in the add event dialog without making it a UI nightmare.
08-06-2009 06:14 AM
08-06-2009 06:42 AM
OK got it...... now what i had done in this case is..... you get an enum of Except Dates in getExceptDates() function..... it will have your "Exc" date, now you match this date with your all dates in the event, and it they match return false and break the loop. I no a bit lengthy process but this is how i did it.
getExceptDate() will return you the date with "Exc" as description... and the normal event list enum returns you all the dates even though they are except dates, so we need to match the date with except date and if except date enum has it return false and dont include it....
08-06-2009 07:50 AM
08-06-2009 08:35 AM
No buddy, the repeat rule is for particular event , so for all recurring events there will be different RepeatRule, so event3 is different subj is different,
1) for event Subj there will be 1 RepeatRule--- so that repeatRule.getExceptDates() enum will give u except dates of "Subj" event only. and further you have the enum of recurring dates of "Subj" event using RepeatRule.dates(blah blah parameters).... now make cascaded while or foor loops to match the normal dates and except dates for event "subj".... when 2 occurences match thats except date. exclude that date and continue with the loop untill the Except date enum exhausts.
2) Yes you can create recurring events programmatically, Use RepeatRule only,
Weekely recurring event
setInt( RepeatRule.FREQUENCY, RepeatRule.WEEKLY );
setInt( RepeatRule.INTERVAL, 3 );
setInt( RepeatRule.DAY_IN_WEEK, RepeatRule.FRIDAY );
After that set this repeatrule to the desired event.
08-06-2009 09:44 AM