I am working on one example application to insert, update and delete a native contact with Android. I can successfully insert, update and delete a contact. But the problem is updating the contact photo. The image below is an observation where the same contact has two different problems. 

After updating the contact, the first image still displays the old image. But where, when I look at the full information, I can view the updated contact image, as shown in the second image. Below is the contact image update code.
mBitmap =getAllowedPhotoBitmap(photo); mBitmap = ThumbnailUtils.extractThumbnail(mBitmap, THUMBNAIL_SIZE, THUMBNAIL_SIZE); ByteArrayOutputStream stream = new ByteArrayOutputStream(); if(mBitmap!=null){ // If an image is selected successfully mBitmap.compress(Bitmap.CompressFormat.PNG ,100, stream); op = ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI); op.withSelection(ContactsContract.Data.CONTACT_ID + "=?" + " AND " + ContactsContract.Data.MIMETYPE + "=?", new String[{String.valueOf(native_contactid), ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE}); op.withValue(ContactsContract.CommonDataKinds.Photo.PHOTO, stream.toByteArray()); ops.add(op.build()); }
What is the problem and where am I mistaken?
sachi source share