Gmail 5.0 app fails with “Permission denied for the attachment” when it receives ACTION_SEND intent

后端 未结 9 1228
感动是毒
感动是毒 2020-11-27 18:35

My app creates mails with attachments, and uses an intent with Intent.ACTION_SEND to launch a mail app.

It works with all the mail apps I tested with, e

9条回答
  •  旧时难觅i
    2020-11-27 19:31

    I was able to pass a screenshot .jpeg file from my app to GMail 5.0 through an Intent. The key was in this answer.

    Everything I have from @natasky 's code is nearly identical but instead, I have the file's directory as

    context.getExternalCacheDir();
    

    Which "represents the external storage directory where you should save cache files" (documentation)

提交回复
热议问题