My app creates mails with attachments, and uses an intent with Intent.ACTION_SEND to launch a mail app.
Intent.ACTION_SEND
It works with all the mail apps I tested with, e
You should implement a FileProvider, which can create Uris for your app's internal files. Other apps are granted permission to read these Uris. Then, simply instead of calling Uri.fromFile(attachment), you instantiate your FileProvider and use:
fileProvider.getUriForFile(attachment);