It seems as if everyone uses a BlackBerry these days. But not everyone organizes their information in quite the same way. If you're going to build the programs that help people stay organized with BlackBerry devices, you need to understand the kinds of data types that users acquire, organize, and use to get through the day.
As we’ve already discussed, PIMItems are stored in a device’s PIMLists. Sometimes, on rare occasions, there may be multiple PIMLists on a device, but usually there’s nothing more than a single default list of PIM data. In order to access the lists of PIM data, you have to obtain a reference to the PIM database.
There are also different methods you can employ once you’ve accessed the database. The static method retrieves an example of the PIM database, which is actually necessary for any further operations. This particular class also includes methods for opening up PIMLists that are already in existence. Here, you can also serialize a PIMItem to an input (our output) stream.
There are also two openPIMList methods, with one opening the default PIMList and the other taking a String argument for a named PIMList. The listPIMLists method enables a developer to obtain a list of available PIMList names, and it returns a String array containing a PIMList name in each array element.
As we discussed earlier, it’s very important to note data types in the BlackBerry Java API documentation. Despite which openPIMList method is used, there are two arguments that are necessary: pimListType, which may be CONTACT_LIST, EVENT_LIST, or TODO_LIST; and mode, which may be READ_ONLY, WRITE_ONLY, or READ_WRITE. Once a developer has the PIMList open, the application can access the elements by employing an enumeration.
Sure, developing applications for BlackBerry may be your forte, but understanding the data types employed by BlackBerry is also essential to understanding how the smartphone device works.