my task is to read all the contacts in a contact db and find out if they have thumbnails or not.
It is being done like this.
CContactDatabase* contactDB = CContactDatabase::OpenL();
CContactItem* contactItem = contactDB->ReadContactLC(id);
CContactItemFieldSet& ref = contactItem->CardFields();
picIndex = contactItem->CardFields().Find(KUidContactFieldPicture);
The above code, works fine as long as the contact has thumbnail,
When the code encounters the contact with out thumbnail for the first time,
the picIndex value is -1 and all subsequent contacts (even if they have thumbnail)
are shown as not having thumbnail and picIndex value is -1.
I tried to search the forum, but of no use.
Is this a known issue??
Note: deleting and opening contact database for every new request does not help.