×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    8

    Unable to view the contacts imported from the net

    Hello friends,
    I am developing an application which will import the contact database from the net and it will be storing into the default database onto the phone. The problem that i am facing now is that, i am able to import the contacts(which are on the net), but i am not able to view the contact details(like name, number..etc). It only shows the following name "UNNAMED" amd there are no details associated with it. Below is the code that i am using..


    TRAP(leaveCode, iContactDb = CContactDatabase::OpenL());
    if (KErrNone == leaveCode)
    {
    TInt i = 0;
    }


    CContactItem* item = CContactCard::NewLC();

    CContactItemField* field1 = CContactItemField::NewLC (KStorageTypeText , KUidContactFieldGivenName);
    field1->TextStorage()->SetTextL(_L("Pratap"));
    CContactItemField* field2 = CContactItemField::NewLC (KStorageTypeText , KUidContactFieldFamilyName);
    field2->TextStorage()->SetTextL(_L("Reddy"));
    CContactItemField* field3 = CContactItemField::NewLC (KStorageTypeText , KUidContactFieldPhoneNumber);
    field3->TextStorage()->SetTextL(_L("1234567"));

    item->AddFieldL(*field1);
    item->AddFieldL(*field2);
    item->AddFieldL(*field3);
    // item takes the ownership of fields
    CleanupStack::Pop(3);

    TInt id = iContactDb->AddNewContactL(*item);

    CleanupStack::PopAndDestroy(); // item


    This is the code guys...help required in this case as soon as possible..
    thnx in advance..

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Unable to view the contacts imported from the net

    Good way to speed up development would be learning to use the search, here's couple of Wiki links:

    http://wiki.forum.nokia.com/index.ph...a_Contact_Item
    http://wiki.forum.nokia.com/index.ph...ds_%28vCard%29

Similar Threads

  1. Can we view "unnamed" contacts through JSR 75
    By j2meDev in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-06-11, 12:44
  2. View Contacts using CPbkContactEditorDlg
    By karthikn in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-05-08, 03:03
  3. Unable to synchronise contacts
    By dreamlmx in forum OMA DM/DS/CP
    Replies: 2
    Last Post: 2003-06-25, 23:42
  4. contacts view
    By jack44 in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-03-12, 10:19

Posting Permissions

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