photo-editor-android
photo-editor-android copied to clipboard
REFRESH THE GALLERY
Hey,
Thank you very much for this library it's the best free photo editor around. Am using it in an app but i had to add some code to refresh the device gallery after saving the image otherwise one has to first restart their device in order to see the saved image.
please share the code you added @pkanyerezi
MediaScannerConnection.scanFile(context,
new String[]{file.getAbsolutePath()}, null,
new MediaScannerConnection.OnScanCompletedListener() {
public void onScanCompleted(String path, Uri uri) {
Log.i("ExternalStorage", "Scanned " + path + ":");
Log.i("ExternalStorage", "-> uri=" + uri);
}
});
This is how I refresh gallery. Just like pkanyerezi said, needs to be called after saving image. hope this helps someone
@liauli Thanks ❤
@liauli , @jasolangi786 Please point to the specific line in the code where we should be putting the code snippet that is shared above.