Unable to view Contact Picture(raw data in vCard) saved using pim_IRecordStore on Pantech CDM8999 | developer.brewmp.com Unable to view Contact Picture(raw data in vCard) saved using pim_IRecordStore on Pantech CDM8999 | developer.brewmp.com

Developer

Unable to view Contact Picture(raw data in vCard) saved using pim_IRecordStore on Pantech CDM8999

Forums:

Hi, I am not able to view Contact Picture if set as raw data using pim_IRecordStore. Below is the code snippet that I am doing. 

 

//Creating vCard Interface 

nResult = ISHELL_CreateInstance(BrewApplicationWrapper::GetShell(), AEECLSID_vCard, (void**)&pIvCard); 



//Creating vProperty Interface for photo property 

nResult += ISHELL_CreateInstance(BrewApplicationWrapper::GetShell(), AEECLSID_vProperty,(void**) &pIvPhotoProperty); 



//Setting the property value with BASE64 encoded image data 

//base64text is BASE64 encoded data 

IvProperty_InitProperty(pIvPhotoProperty, AEEVPROPERTY_PHOTO, "PHOTO", FALSE, (void*)base64text, base64tlength, NULL); 



//Creating vParm for adding vProperty parameters 

//Encoding Parm 



nResult = ISHELL_CreateInstance(BrewApplicationWrapper::GetShell(), AEECLSID_vParm,(void**)&pIvEncodingParam ); 

//Type Parm 

nResult += ISHELL_CreateInstance(BrewApplicationWrapper::GetShell(), AEECLSID_vParm, (void**)&pIvTypeParam); 





//Adding parms to property 



nResult = IvProperty_AddParm(pIvPhotoProperty, pIvEncodingParam); 

nResult += IvProperty_AddParm(pIvPhotoProperty, pIvTypeParam); 





//Finally adding the photo property to vCard 

nResult = IvCard_AddProperty(pIvCard, pIvPhotoProperty); 



The result of above is SUCCESS. 

After this using IvObjectParser_GetBufferFromIvObject i am getting the vCard Buffer and adding a new record using the vCard buffer as below 

//Add record to Native Address Book 

nResult = pim_IRecordStore_AddRecord(pIRecordStore, (const unsigned char*)pVCardBuf, STRLEN(pVCardBuf) + 1, &ID); 
This also returns success I am able to see the record in Native Address book but the Contact Picture is not visible. However if I try to set the image by giving an URL I am able to see the Contact Picture. But my requirement is to have the image as a part of vCard buffer as raw data. Please correct me if I am doing something wrong. Is this OEM issue or wrong usage of API? Do let me know how to proceed.