Blackberry - How to get Field Labels from PIMItem

Posted by Taha on Stack Overflow See other posts from Stack Overflow or by Taha
Published on 2010-05-06T04:55:35Z Indexed on 2010/05/06 11:38 UTC
Read the original article Hit count: 346

Filed under:
|
|

How can we get Field Labels from PIMItem. The following code is with PIMList

String label = pimList.getAttributeLabel(
    blackBerryContact.getAttributes(Contact.TEL, i));

But i have PIMItem. There is a method PIMItem.getPIMList() which returns null for me in the code below. THE API at http://www.blackberry.com/developers/docs/5.0.0api/index.html says "getPIMList() Gets the PIMList associated with this item." Below is sample code that i am trying to achive -

// Load the address Book and allow the user to select a contact
BlackBerryContactList contactList = (BlackBerryContactList) 
    PIM.getInstance().openPIMList(PIM.CONTACT_LIST,PIM.READ_ONLY);
PIMItem userSelectedContact = contactList.choose();
// Now get the Field labels for contact numbers for userSelectedContact 

© Stack Overflow or respective owner

Related posts about blackberry

Related posts about pim