06-25-2010 02:12 PM
The following code returns the blackberry default calendar:
(EventList) PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
However, there are other calendars user can create.eg.facebook calendar. Is there a way to retrieve a calendar which is not the default rim calendar. FYI, I am using 4.2.1 jde for my project.
06-28-2010 02:21 PM
While this is not possible in version 4.2.1, it is supported in version 4.6.0 and higher.
From the 5.0 PIM JavaDocs:
PIM (BlackBerry JDE 5.0.0 API Reference)
The standard calendar and contact list PIM applications on a BlackBerry device support multiple databases. When a device is associated with multiple accounts, such as BlackBerry Enterprise Server accounts and BlackBerry Internet Service accounts, each account has its own database for the calendar and the contact list PIM applications. For example, if a device is associated with both a BlackBerry Enterprise Server account and a BlackBerry Internet Service account, the calendar and contact list applications each have a database for each account.
Support for accessing the multiple EventLists was added in BlackBerry software version 4.6.0. Invoking
PIM.listPIMLists(PIM.EVENT_LIST) returns a name for each individual
EventList so that they can be accessed individually. In previous versions of the software, the JSR75 PIM API only returned a single
EventList which provided access to all of the EventLists without distinguishing between EventLists for different BlackBerry Enterprise Server accounts.
Support for accessing the multiple ContactLists was added in BlackBerry software version 5.0.0. Invoking
PIM.listPIMLists(PIM.CONTACT_LIST) returns a name for each individual
ContactList so that they can be accessed individually. In previous versions of the software, the JSR75 PIM API only returned a single
ContactList which provided access to all of the ContactLists without distinguishing between ContactLists for different BlackBerry Enterprise Server accounts.
There is currently no support for accessing multiple
BlackBerryMemoList returned from
PIM.openPIMList() provides access to all of the lists of that database without distinguishing between the different BlackBerry Enterprise Server. accounts
If an application maintains a parallel database to a PIMList then the PIMList should be referenced by its UID instead of its name. This is because the name of a PIMList can change over its lifetime and also may be assigned a different name if the BlackBerry device software is upgraded or downgraded. A PIMLists's UID can be obtained from
BlackBerryPIMList.getPIMListUID() and a PIMList can be opened by its UID using
BlackBerryPIM.openPIMList(int, int, long). Support for PIMList UIDs was added in BlackBerry software version 5.0.0.