title: How to delete a file from SD card
body: <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 <code>myFile.delete();</code> but it didn't delete the file.</p>
  
  <hr>
  
  <p>I'm using this code for Android, so the programming language is Java using the usual Android ways to access the SD card. I am deleting the file in the <code>onActivityResult</code> method, when an <code>Intent</code> is returned to the screen after sending an email.</p>