I have a requirement to attach a zip file to a message in the Android email composer.
The zip file is created by my application and stored in a closed application storage area (accessible via getFilesDirectory ()). I get the URI for this Zip file and add it to the email intent object; when I start email activity, I can see the attachment, but my mail recipient does not receive files,
After doing some research on this, I found that my application data could not be transferred to another application (in this case, the Android email application).
To solve this problem, I would like to apply the recommended solution of using a content provider to share the data of my application.
First of all, I would like to confirm whether this is possible, and can someone please give me some tips on how to do this. I need to know how to copy my Zip file from getFilesDirectory () of my application, the content provider, and how to connect the content provider URI to the email intent object.
I can not put zip files on the SD card ...
I just want to only save my files in my internal storage and connect to the email writer.
source share