title: android : deleting an image
body: <p>I am deleting an image file from my application. I was doing  </p>
  
  <pre><code>new  File(filename).delete ();
  </code></pre>
  
  <p>This was actually deleting the file. But the image was still visible in the gallery.</p>
  
  <p>On search i found that we should use </p>
  
  <p><code>getContentResolver().delete(Uri.fromFile(file), null,null);</code> to delete</p>
  
  <p>But here i am getting the exception:</p>
  
  <blockquote>
    <p>Unknown file URL. java.lang.IllegalArgumentException: Unknown URL
    file:///mnt/sdcard/DCIM/Camera/IMG_20120523_122612.jpg</p>
  </blockquote>
  
  <p>When i see with any file browser, this particular image is present. Please help me to fix this issue. Is there any other way to update gallery when image is physically deleted</p>