12-22-2010 10:47 AM - edited 12-22-2010 10:48 AM
I am trying to read out the Nickname of a Contact in a BlackBerry Java app but the method call
getPIMList().isSupportedField(BlackBerryContact.NI
always tells me that the Field is not supported.
Am I doing something wrong or is it really not supported? Because the devices I am testing on allow me to add a Nickname field in the address book.
03-04-2011 11:54 PM
Confirming it. Could not read nor write BlackBerryContack.NICKNAME. Although can enter it through "Contacts" phone/simulator application.
03-05-2011 01:36 AM
Hai,
u can read name from contact as,
try {
BlackBerryContactList berryContactList = (BlackBerryContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
Enumeration items = berryContactList.items(BlackBerryContactList.SEARC
while(items.hasMoreElements())
{
BlackBerryContact contact =(BlackBerryContact) items.nextElement();
String[] name = contact.getStringArray(BlackBerryContact.NAME, 0);
String firstName = name[Contact.NAME_GIVEN];
String lastName = name[Contact.NAME_FAMILY];
}
} catch (PIMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
03-05-2011 03:07 AM
Yes, I can read name. But, as Subj suggests, we speak about NICKNAME.