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..



