I want to insert a contact photo with other information in a batch insert. "is" is the input stream using the uri of the photo:
is = Data.clientContext.getContentResolver().openInputStream(/data/data/com.project.xxxxxxxxxxxxx/files/photo);
op_list.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
.withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
.withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE)
.withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, is)
.build());
I cannot seem to get the photo to insert with the batch. Any pointers?