Android: Where should I save temporary files?
<p>My application allows users to create and modify files. I would like them to be able to send a file as an email attachment. So, I need to first create and write to a temporary file, which I then attach to the email. Unfortunately, based on the lone response to the below question, it seems there is no good way to know that the email application is done with the temporary file.</p>

<p><a href="http://stackoverflow.com/questions/5859944/android-problem-sending-email-with-attachment-from-my-application">Android: problem sending email with attachment from my application.</a></p>

<p>Because I can't receive any notification that the email is done with the file, my rules for deleting temporary files are pretty bad.  They are something like "check for temp files onPause and onCreate; delete anything over 5 minutes old".  </p>

<p>Because my rules are so ugly, I'm particularly concerned where I should write the files.  I can not write them to the internal cache directory because their size can greatly exceed 1mb.  Is it reasonable to create a folder devices' sdcard: "/sdcard/myapp_tmp"?  What is the common practice for this situation?</p>
