I create a file manager in which image elements have a small sketch.
I get a thumbnail using MediaStore . Everything is working fine. But when I rename or move the file, the thumbnail is not displayed.
I found a code snippet for updating MediaStore :
getActivity().sendBroadcast( new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));
This worked, but I have to wait 4 or 5 seconds and refresh, then refresh the thumbnail.
How to get a thumbnail of an image right after renaming or moving?
source share