Android File.delete not working
<p>Im trying to delete an image file after I saved it to SD card, but the delete function is not working.  Any help will be appreciated. Here is my code:</p>

<pre><code>// Save image to SD card
String path = Environment.getExternalStorageDirectory().toString(); 
File file = new File(path, "tmpimage" + ".jpg"); 
....
....
....
// Delete image from SD card
file.delete();
</code></pre>

<p>Later on I found out that I was actually deleting the file. The File.delete function actualy was working ok. I was saving the image also to the Gallery and was expecting the file.delete to remove it from Gallery. Thanks everyone for answering my question.</p>
