FileProvider in Android 4.1/4.3/4.4 Email App fails with column ‘_data’ does not exist

I know, it might be too late, but I stumbled over the exact same problem and it took me a while to find my mistake:

My fault was, that I deleted the original file I like to send when my app got back from the email-app. (I tried to clean up temporary files)

Unfortunately, the email-app does not send the mail right away nor does it make a copy of the attachment. So when the file will be deleted before the mail was sent (as I did) the attachment got lost.

This behavior is different from most other apps (including Gmail-app) that take care of the file before returning back to my app.

Leave a Comment

File not found.