How to delete a file from SD card?
<p>I am creating a file to send as an attachment to an email. Now I want to delete the image after sending the email. Is there a way to delete the file?</p>

<p>I have tried: </p>

<pre><code>myFile.delete();
</code></pre>

<p>but it didn't delete the file.</p>

<hr>

<p>I'm using this code for android OS, so the programming language is Java using the usual Android ways to access the SD card. I am deleting the file in <code>Onactivityresult();</code> method, when intent is returned to screen after sending email.</p>
