Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Add a PIM item to a custom category

by Retired ‎02-16-2010 01:09 PM - edited ‎09-16-2010 02:59 PM (1,948 Views)



This article applies to the BlackBerry® Java® Development Environment (JDE) 4.1 and later.




A custom or new category can be added to the following PIMItem interfaces during creation:


  • Contact
  • ToDo
  • Memo (as of BlackBerry JDE 4.2)

For these interfaces, there are two default categories available: Personal and Business.


To add a custom category, the category must be first added to the PIMList, and only then can be added to the PIMItem itself.


For example, using the javax.microedition.pim.ContactList and javax.microedition.pim.Contact interfaces:



ContactList contactList = (ContactList)PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.WRITE_ONLY);
Contact contact = contactList.createContact();
// Adds the category inputted to the ContactList.


// Adds the same category inputted to the contact.



If the category is not added to the PIMList prior to attempting to add it to the PIMItem, a PIMException will be thrown.

Users Online
Currently online: 32 members 2,757 guests
Please welcome our newest community members: