0 Replies Latest reply: May 13, 2010 1:13 AM by 843851 RSS

    Adding New contacts

    843851
      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