Reputation: 183
I am using photo editor android sdk in my app to edit images.When I am using same image for different editing operations like apply stickers, filters or other changes.I do editing and save image with same name and then perform editing again, but the second time when trying to save changes it returns original image with only latest changes.
currently I have to provide different name each time for editing.but It is not permanent solution.Please help.
Upvotes: 0
Views: 213
Reputation: 539
/**
* We need to notify the MediaScanner when a new file is created.
* In this way all the gallery applications will be notified too.
*
* @param filepath
*/
private void updateMedia( String filepath ) {
Log.i( LOG_TAG, "updateMedia: " + filepath );
MediaScannerConnection.scanFile( getApplicationContext(), new String[] { filepath }, null, null );
}
For application data :
if (output.exists()){
output.delete(); //DELETE existing file
fileName = "myfile.jpg";
output = new File(imagesFolder, fileName);
}
Upvotes: 0