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

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)

Leave a Comment