possible duplicate
Refreshing the thumbnail using MediaScanner
I have a problem regarding the update of thumbnails in the android in built-in gallery. Actually I have opened, edited and saved the image which was selected in the gallery.
I open leave the gallery and open the gallery again, then the thumbnail for that image is not updated. However, I pick the image, it is the edited version indeed.
Does anybody have solution about this? I have search but I'm getting the answer about refreshing the gallery using sendBroadcast()
, which does not seem to update the image previews.
Edit
I don't want to delete the existing file because suppose user want to save file with different name then that file did not affected
I found a workaround for this problem, before you request a new thumbnail you need to delete old one. Use MediaStore and ContentResolver for this
You can get photoId from its URI, to get URI from file name just create File and parse URI from it
Two suggestions.