[android-developers] Re: how to add picture into android Content Provider

2012-05-09 Thread SebastianPL
I don't know if you still need it, but it should look like this:

ops.add(ContentProviderOperation.newInsert(android.provider.ContactsContrac
t.Data.CONTENT_URI)
 
.withValueBackReference(Data.RAW_CONTACT_ID,
rawContactInsertIndex)
 .withValue(Data.MIMETYPE,
Photo.CONTENT_ITEM_TYPE)
 .withValue(Data.IS_SUPER_PRIMARY, 1)
 .withValue(Photo.DATA15,
yourPicture)
 .build());

yourPicture is a byte[].

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


[android-developers] Re: how to add picture into android Content Provider

2012-05-09 Thread SebastianPL
ops.add(ContentProviderOperation.newInsert(android.provider.ContactsContrac
t.Data.CONTENT_URI)
                                       
 .withValueBackReference(Data.RAW_CONTACT_ID,
rawContactInsertIndex)
                                 .withValue(Data.MIMETYPE,
Photo.CONTENT_ITEM_TYPE)
                                 .withValue(Data.IS_SUPER_PRIMARY, 1)
                                 .withValue(Photo.DATA15, picture)
                                 .build());

picture is a byte[].

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