Thursday, October 14, 2010

Attachment disappears after e-mail sent programatically

I banged my head in the wall for about an hour to fix this issue.

I wrote a small function in Android that let the user send an e-mail from my application. Everything worked just fine, but when the e-mail was sent the attachment disappeared (the attachment appeared within the GMail client on the android device before sending).

Solution: use the external storage (SD Card) instead of the application cache. The GMail client probably can't access the application cache folder, buf for some reason it shows as if the attachment is OK in the client).

No comments: