This discussion is archived
0 Replies Latest reply: May 12, 2010 11:13 PM by 843851 RSS

Adding New contacts

843851 Newbie
Currently Being Moderated
Hi,
Currently am doing an application for adding contacts and below is my code.

This code is working fine in Nokia. wherein case of sony ericsson it is not getting supported.

Can you pls help me to sort out this issue?


try {           
Contact contact = null;
PIM pimInst = PIM.getInstance();
contactList = (ContactList) pimInst.openPIMList(PIM.CONTACT_LIST,PIM.READ_WRITE);
contact = contactList.createContact();

String[] name = new String[contactList.stringArraySize(Contact.NAME)];
name[Contact.NAME_GIVEN] = "Anu";
name[Contact.NAME_FAMILY] = "philip";

contact.addStringArray(Contact.NAME, Contact.ATTR_NONE,name);



contact.commit();

}catch (PIMException ex) {           

}



Thanks in advance
Veena