From 3ebfb6717c149827f9b9b2ab2c31d5f2f44f6911 Mon Sep 17 00:00:00 2001 From: macdonst Date: Tue, 22 Nov 2011 05:28:40 +0800 Subject: [PATCH] Fix for CB-17: WebView caching resized pictures --- framework/src/com/phonegap/CameraLauncher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/com/phonegap/CameraLauncher.java b/framework/src/com/phonegap/CameraLauncher.java index 0fdb08a4..9dd5d0c1 100755 --- a/framework/src/com/phonegap/CameraLauncher.java +++ b/framework/src/com/phonegap/CameraLauncher.java @@ -404,7 +404,9 @@ public class CameraLauncher extends Plugin { bitmap.recycle(); bitmap = null; - this.success(new PluginResult(PluginResult.Status.OK, ("file://" + fileName)), this.callbackId); + // The resized image is cached by the app in order to get around this and not have to delete you + // application cache I'm adding the current system time to the end of the file url. + this.success(new PluginResult(PluginResult.Status.OK, ("file://" + fileName + "?" + System.currentTimeMillis())), this.callbackId); System.gc(); } catch (Exception e) { e.printStackTrace();