Gmail 5.0 app fails with “Permission denied for the attachment” when it receives ACTION_SEND intent
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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, except for the new Gmail 5.0 (it works with Gmail 4.9), where the mail opens without attachment, showing the error: "Permission denied for the attachment". There are no useful messages from Gmail on logcat. I only tested Gmail 5.0 on Android KitKat, but on multiple devices. I create the file for the attachment like this: String fileName = "file-name_something_like_this" ;