Hi everyone,

i'm using the library android-vcard(http://code.google.com/p/android-
vcard/) to export data contacts to a vCard

The problem i'm having is that i only suceed exporting name,phone and
email, but i want to export other fields like website,birthday or
nickname, can anyone help me?I copy the code relationated to it

import a_vcard.android.provider.Contacts;
import a_vcard.android.syncml.pim.vcard.ContactStruct;
import a_vcard.android.syncml.pim.vcard.VCardComposer;


public class Vcard {
        public VCardComposer mComposer = new VCardComposer();
        public ContactStruct mContact = new ContactStruct();


        public void addData( String mimeType,
                                                        String data1,
                                                        int data2,
                                                        String data3,
                                                        String data4,
                                                        String data5,
                                                        boolean isPrimary){
                if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/name") 
){
                        mContact.name = data1;
                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
phone_v2") ){
                        mContact.addPhone(data2, data1, data3, isPrimary);
                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
email_v2") ){
                        mContact.addContactmethod(Contacts.KIND_EMAIL, data2, 
data1, data3,
isPrimary);
                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
organization") ){

                }
                else if ( 
mimeType.equalsIgnoreCase("vnd.android.cursor.item/im") ){

                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
nickname") ){

                }
                else if ( 
mimeType.equalsIgnoreCase("vnd.android.cursor.item/note") )
{

                }
                else if ( 
mimeType.equalsIgnoreCase("vnd.android.cursor.item/postal-
address_v2") ){

                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
website") ){
                }
                else if ( mimeType.equalsIgnoreCase("vnd.android.cursor.item/
contact_event") ){

                }
        }
}


Thanks a lot

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to