×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    217

    Create a new contact with home, work.. phone numbers

    Hi,

    I want to create and add a new contact to the phonebook with this code:
    CContactItem* contact = CContactCard::NewLC();

    CContactItemField* field = CContactItemField::NewLC( KStorageTypeText, fieldUid );
    field->SetMapping( fieldvCardUid );
    field->TextStorage()->SetTextL( *aParamaterValue );
    contact->AddFieldL( *field );
    CleanupStack::Pop();

    iContactDb->AddNewContactL( *contact );
    iContactDb->SetOwnCardL( *contact );


    I am using the following uid for the fields I need to add but there are certain fields I don't know the uid ????
    fieldUid = ???
    fieldvCardUid = KUidContactFieldVCardMapCELL;

    fieldUid = ???
    fieldvCardUid = KUidContactFieldVCardMapHOME;

    fieldUid = ???
    fieldvCardUid = KUidContactFieldVCardMapWORK;

    fieldUid = KUidContactFieldFax; // This doesn't work
    fieldvCardUid = KUidContactFieldVCardMapTELFAX;

    fieldUid = KUidContactFieldPhoneNumber;
    fieldvCardUid = KUidContactFieldVCardMapTEL;

    fieldUid = KUidContactFieldFamilyName;

    fieldUid = KUidContactFieldGivenName;

    fieldUid = KUidContactFieldAdditionalName;

    fieldUid = KUidContactFieldPrefixName;

    fieldUid = KUidContactFieldSuffixName;

    fieldUid = KUidContactFieldEMail;
    fieldvCardUid = KUidContactFieldVCardMapEMAILINTERNET;

    Do you know the fields uid with ??? ?
    Are the any other way to add a contact to the phonebook?

    Thanks in advance.

  2. #2
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Jordan
    Posts
    213

    Re: Create a new contact with home, work.. phone numbers

    Have a look at these two articles will probably help you:

    1) http://http://wiki.forum.nokia.com/i...a_Contact_Item

    2) http://http://wiki.forum.nokia.com/i...n_subfields%3F

    and check the cntdef.h global variables header file for the UID's.


    Good luck
    Regards,
    Leonard

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    83

    Re: Create a new contact with home, work.. phone numbers

    I can't open that address,anyone help?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Create a new contact with home, work.. phone numbers

    Quote Originally Posted by s3920209 View Post
    I can't open that address,anyone help?
    can you tell more about what problem you are getting.

  5. #5
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    83

    Re: Create a new contact with home, work.. phone numbers

    I could not open the link above

  6. #6
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: Create a new contact with home, work.. phone numbers


  7. #7
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    83

    Re: Create a new contact with home, work.. phone numbers

    Thank you.

Similar Threads

  1. Replies: 20
    Last Post: 2008-09-05, 02:41
  2. OMA DRM media transfer using PC to Phone using USB
    By venky123 in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2008-08-13, 03:02
  3. Replacing phone numbers with names in SMS
    By bsekerci in forum General Messaging
    Replies: 2
    Last Post: 2008-03-13, 06:23
  4. Replies: 1
    Last Post: 2006-10-12, 10:26
  5. Multiple Phone definitions in contact item
    By sueggelh in forum Symbian
    Replies: 1
    Last Post: 2004-11-10, 03:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×