This page was last modified 11:40, 4 May 2007.
How to programmatically add contact information subfields?
From Forum Nokia Wiki
CContactDatabase* contactsDb = CContactDatabase::OpenL();
CleanupStack::PushL(contactsDb);
CContactItem* contact = CContactCard::NewLC();
CContactItemFieldSet* fieldset = CContactItemFieldSet::NewLC();
CContactItemField* field =
CContactItemField::NewLC(KStorageTypeText,
KUidContactFieldAddress); // VCardUID for address field
field->SetMapping(KUidContactFieldVCardMapADR); // VCardUID for street field type
field->AddFieldTypeL(KUidContactFieldVCardMapHOME); // VCardUID for home field type
field->TextStorage()->SetTextL(KStreetname);
fieldset->AddL(*field);
contact->UpdateFieldSet(fieldset);
CleanupStack::Pop(2); // field, fieldset
contactsDb->AddNewContactL(*contact);
CleanupStack::PopAndDestroy(2); // contact, contactsDb
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem in Retreving the contacts | deepu28 | Mobile Java General | 2 | 2008-01-26 05:54 |
| Place a video call from J2ME | testN95_ | Mobile Java Media (Graphics & Sounds) | 3 | 2008-04-24 10:39 |
| change profile file programmitically | giridharn | General Symbian C++ | 20 | 2007-03-08 15:00 |
| phone call adds contact | leprien27 | General Discussion | 2 | 2008-02-18 06:31 |
| Can It be possible with Symbian? | koanessie | General Symbian C++ | 2 | 2007-08-29 11:03 |
