I can successfully retrieve a  FileInputStream with this uri
as follows

        Uri myPerson = Uri.withAppendedPath
(ContactsContract.Contacts.CONTENT_VCARD_URI, iLookKey);
        AssetFileDescriptor afd =this.getContentResolver
().openAssetFileDescriptor(myPerson, "r");


        FileInputStream fis = afd.createInputStream();


However, when I wanna input a vcard to change the content of a
contact
as follows

        Uri myPerson = Uri.withAppendedPath
(ContactsContract.Contacts.CONTENT_VCARD_URI, iLookKey);
        AssetFileDescriptor afd =       this.getContentResolver
().openAssetFileDescriptor(myPerson, "w");
FileOutputStream fos = afd.createOutputStream();

IOException is caught in the line of "FileOutputStream fos =
afd.createOutputStream();".
and it said that "unable to seek"

I believe that that's no problem about Lookup key .
Could anyone tell me what's wrong with the exception caught???
I need to restore some vcard in codes yet I dun wanna breakdown the
content of vcard by categorys.
Thank You~~

-- 
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