views:

16

answers:

0

We generate a temporary file on an Android device and attach it to an email. We use a custom Content Provider to feed that file to the email application. The problem is that the email application access the file many times, instead of once, until it finally sends the email (for example, every time it writes a draft we get a request).

That makes hard to know when to delete that temporary file.

Any ideas on a safe method to know when our email was delivered so we can clean the device and not leave trash behind? (periodically delete also does not seem right as the phone can be for a while with the email in the Drafts folder)

Thanks a lot for the help!