언어 설정

Menu
Sites
Language
exporting contacts to v card

hi all,
i am trying for an application which back up the contacts in tizen mobile ,here is my sample code , i exported the contacts to vcrd file .
when i click the vcard file it is showing only one contact , but i had exported 3 contacts
can any one figure out the error 

AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
    IList *pContactList = pAddressbookManager->GetAllContactsN();
    String displayName;
    Contact* pContact = null;
    IEnumerator* pEnum = pContactList->GetEnumeratorN();
    while (pEnum->MoveNext() == E_SUCCESS)
    {
       pContact = static_cast< Contact* >(pEnum->GetCurrent());
       pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
       AppLog("name of contact is %s",displayName.GetPointer());
    }

    pAddressbookManager->ExportContactsToVcard(*pContactList,L"/opt/storage/sdcard/1.vcf");
    delete pEnum;

    pContactList->RemoveAll(true);

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 댓글
Alex Ashirov

Hi,

I am not sure about ExportContactsToVcard(), but ExportContactsToVcardStreamN() works fine. It generates vCards for each contact from the list. Could you please try it?

Slawek Kowalski

ExportContactsToVcard() works very well.

 

Eric Satkimbaev

Hi,

I have checked the ExportContactsToVcard(). It works fine. All of my contacts were exported to the .vcf. But please note that when you open the .vcf file using MyFiles application then it is opened by standard Contacts window and it displays only the first contact in the file.