03-04-2013 02:08 PM
Hello,
I have successfully been able to create a CalendarEvent in the CalendarService, however I am struggling with setting a finite Recurrence with weekly frequency to the event.
From documentation: "A finite recurrence has an end date or a number of occurrences."
I've tried both of the following, where both respond with recurrence.isValid() = true, and the CalendarService's createEvent method returns a success result. Yet on the simulator, I run into issues with both cases
i) Finite # of occurences
In this example, I attempt to set the number of occurences to 9, however when the CalendarEvent is created in the service, I do not see all 9 occurences within the native calendar application
Image showing details of recurring event (note that the recurrence info is correct)
Image showing month view (note that there should be events for the MWF on week of March 11 and March 18)
Code:
CalendarEvent event;
...
Recurrence weeklyRec;
weeklyRec.setFrequency(Frequency::Weekly);
weeklyRec.setNumberOfOccurrences(9);
weeklyRec.setDayInWeek(DayOfWeek::Monday | DayOfWeek::Wednesday | DayOfWeek::Friday);
if (event.isValid()) {
event.setRecurrence(weeklyRec);
}
bb::pim::calendar::Result::Type result = m_calendarService->createEvent(event);ii) Set Until Date
In this example, I use setUntil to set the until date to a month afterwards. While the recurrence is valid and the event gets successfully added, the next time I open the month view in the native calendar app, it loads forever and never displays the new recurring calendar event.
Image showing loading (note: even when I restart the simulator, this loading persists)
Code:
CalendarEvent event; ... Recurrence weeklyRec; weeklyRec.setFrequency(Frequency::Weekly); weeklyRec.setUntil(QDateTime::currentDateTime().addMonths(1)); weeklyRec.setDayInWeek(DayOfWeek::Monday | DayOfWeek::Wednesday | DayOfWeek::Friday); if (event.isValid()) { event.setRecurrence(weeklyRec); } bb::pim::calendar::Result::Type result = m_calendarService->createEvent(event);
There has been a similar question here (http://supportforums.blackberry.com/t5/Cascades-De
Please, any assistance would be greatly appreciated!
03-04-2013 03:30 PM
Does this work on an actual device? The finite # event details screenshot makes it look like it's definitely a bug somewhere, as clearly the calender knows it's recurring on some level.
03-04-2013 03:37 PM - edited 03-04-2013 03:39 PM
Hi Paul,
We have replicated the issue for both cases on an actual device (dev alpha B), and are now in the midst of resetting / restoring the OS due to the loading malfunction resulting in case 2 (using until date).
03-04-2013 06:22 PM
I am assuming you are using the latest SDK (10.0.10.261) and OS (10.0.10.263) versions available?
If not, it is always advisable to update to the latest OS versions; more info here - http://developer.blackberry.com/devzone/blackberry
If you are still facing the same issue on the device using the latest OS/SDK version, as Paul indicated, this is most likely a bug. Please file a bug through the Developer Issue Tracker. Link: https://www.blackberry.com/jira/secure/Dashboard.j
You can just try to copy/paste the same info you pasted here (more info, the better; include the OS/SDK versions etc).
Paste back the DIT item link here and we will try to escalate it ASAP.
Cheers,
Rashid
03-04-2013 06:30 PM
On a side note (just in case you didn't know the following already):
* You can take screen shots directly on the device by pressing "Volume Up" and "Volume Down" key at the same time; that saves the screen shots as images under the shared folders ("Camera").
* You can also make use of the controller for the simulator to use various things: http://developer.blackberry.com/develop/simulator/
http://developer.blackberry.com/develop/simulator/
03-04-2013 10:44 PM
Yes, we're currently using the Dev Alpha B device with OS version 10.0.10.263, and we've tested on both the 10.0.10.263 SDK target, as well as SDK version 10.0.09.1673.
I've also tried using the 10.1 beta SDK, with the newest Q10 simulator and have run into similar problems.
I'll create an issue for it, thank you for your assistance.
03-05-2013 12:17 AM
Here is the posted DIT item link:
https://www.blackberry.com/jira/browse/BBTEN-956
Thanks a lot for the help, everyone.
03-05-2013 06:00 PM
Thanks for creating the DIT issue. We already carried it over to the internal issue tracker and will try to escalate it as much possible with the internal product & development teams. However, if this indeed a bug and if it does need to be fixed on the platform/OS level, it will probably be a couple of months before the public developer OS versions will have the fix.
03-06-2013 12:30 PM
What do you suggest as an alternative in the meantime?
I can create a unique CalendarEvent for each day of the week within the recurrence (and hence ignore setting the Recurrence property). While this is slightly more expensive, I'm more worried about flooding the service with too many events.
Is there a limit to how many CalendarEvents can be created within the CalendarService?
Also, is there a way to create a new CalendarFolder within the API, where I can put these events?
(I noticed a post here http://supportforums.blackberry.com/t5/Cascades-De
03-06-2013 01:12 PM
As well, why is it that Recurrence has both an "end" QDateTime property, and an "until" QDateTime property?
According to the documentation, "until" is the property I should be using to set an endpoint for a finite recurrence (if not directly setting a finite number of occurences). I assume "start" indicates on what date the recurrence should begin. So what is the purpose of "end" in this case?