1
我在這裏有一個問題,只要編輯器的意圖被激活,sdk自動將圖像保存到圖庫中。並且在編輯完成後再次進行一次。我如何防止在這裏自動保存?如何防止AdobeCreativeSDK自動將圖像保存到android手機?
AdobeImageEditorActivity.class
protected void performSave(Bitmap bitmap, Uri saveUri, CompressFormat outputFormat, int quality, boolean hires, AdobeImageEditorActivity.FinalAction action) {
logger.info("performSave, uri:%s, quality: %d, action:%s", new Object[]{saveUri, Integer.valueOf(quality), action});
File destFile;
if(saveUri != null) {
destFile = new File(saveUri.getPath());
} else {
destFile = this.getDefaultOutputDestination(outputFormat);
}
try {
logger.log("trying to create the new file...");
if(!destFile.exists() && !destFile.createNewFile()) {
logger.error("Failed to create the file");
}
} catch (IOException var11) {
var11.printStackTrace();
try {
logger.error("using a temporary file!");
destFile = File.createTempFile("aviary-image-", ".jpeg");
} catch (IOException var10) {
var10.printStackTrace();
}
}
LocalDataService service = (LocalDataService)this.getMainController().getService(LocalDataService.class);
assert service != null;
service.setDestImageUri(Uri.parse(destFile.getAbsolutePath()));
AdobeImageEditorActivity.SaveHiResImageTask mSaveTask = new AdobeImageEditorActivity.SaveHiResImageTask(destFile, action, outputFormat, quality, hires);
mSaveTask.execute(new Bitmap[]{bitmap});
}
我實現了上面的代碼可能是實際執行的是保存,但它是一個自動生成的文件,有沒有什麼辦法,我可以做,以防止儲蓄髮生?