Hi there. Was there any solution for this? 'Cause I have a same problem.

On Friday, November 26, 2010 9:11:40 AM UTC+4, Prateek Jain wrote:
>
> Hi All, 
>
> I am able to retrieve all contacts from android in .vcf file using 
> following code. 
>
> ContentResolver cr = getContentResolver(); 
>     Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,null, 
> null, null, null); 
> String lookupKey = 
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY)); 
>                         Uri uri = 
> Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_VCARD_URI, 
> lookupKey); 
>                         System.out.println("The value is " + 
> cr.getType(uri)); 
>                         AssetFileDescriptor fd = 
> this.getContentResolver().openAssetFileDescriptor(uri, "r"); 
>                         FileInputStream fis = fd.createInputStream(); 
>
>
> I don't know how to use this .vcf file to import all these contacts 
> using code. The .vcf file contains all the details of all contacts 
> including photos etc. 
>
> Cheers, Prateek 
>

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

Reply via email to