Actually i have found no of contacts and no off ield in particular record.. But how to proceed further for reading those entries so tat i can store it into a database. Can anybody help me..
hi i have picked firstname,last name,mail,fax,company but how to pick job mobile genearl(telephone no.) i i m not finding any uids in contacts model for these three can u help me
Forum posts: 56
the name of the doc is using contacts api or something of that sort.
hope this helps
Forum posts: 118
search SDK documentation for "Contacts model constants"
and try to fetch information from contact database with those constants.
Prashant {prashu}
Forum posts: 239
---------------
Bhatt Kavita
Forum posts: 118
is it solved u r problem?
Prashant {prashu}
Forum posts: 239
Thanks
---------------
Bhatt Kavita
Forum posts: 118
if u'll explain more abt ur problem then anyone can give u nearest solution.
Prashant {prashu}
Forum posts: 239
But how to proceed further for reading those entries so tat i can store it into a database.
Can anybody help me..
---------------
Bhatt Kavita
Forum posts: 239
but how to pick
job
mobile
genearl(telephone no.) i
i m not finding any uids in contacts model for these three can u help me
---------------
Bhatt Kavita
Forum posts: 118
job = KUidContactFieldJobTitle
mobile = KUidContactFieldPhoneNumber
general(telephone no) = KUidContactFieldPhoneNumber
actually "KUidContactFieldPhoneNumber" giving both mobile and telephone no. by creating entry
for each.
Prashant {prashu}
Forum posts: 239
giving me same number both for telephone(general)and mobile.
It gives me telephone number for mobile.
---------------
Bhatt Kavita
Forum posts: 118
Hi this id returning both numbers try some way to SHOw them.
Prashant {prashu}
Forum posts: 57
CContactItem* card = contactsDb->ReadContactL(cardId);
CleanupStack::PushL(card);
// get fields
CContactItemFieldSet& fields = card->CardFields();
// read no of fields this contact has
TInt fieldsNo = card->CardFields().Count();
CDesCArray *text_array = new (ELeave) CDesCArrayFlat(1);
// go through all contast's fields
for( TInt i(0); i<fieldsNo; ++i )
{
// get current field
const CContactItemField& field = fields[i];
TStorageType storageType = field.StorageType() ;
TPtrC labelText = field.Label();
TPtrC fiedText = field.TextStorage()->Text();
If you want to get spesific kins of fields, do
// get fields
CContactItemFieldSet& fields = card->CardFields();
TInt fieldsNo = card->CardFields().Count();
TInt datapos = fields.FindNext(KUidContactFieldPhoneNumber); // important step
while (datapos != KErrNotFound)
{
TPtrC number = fields[datapos].TextStorage()->Text();
if (datapos+1<fieldsNo)
datapos = fields.FindNext(KUidContactFieldPhoneNumber,datapos+1);
else datapos = KErrNotFound;
}
Is this a kind of answer you wanted?
Forum posts: 239
thanks magsus and prashu
magsus ur trick resolved my problem
Thanks again
Regards
---------------
Bhatt Kavita