从我的应用程序从附加安全存储的文件在Gmail [英] Attaching a file from secure storage in Gmail from my app

查看:153
本文介绍了从我的应用程序从附加安全存储的文件在Gmail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有一个选项发出日志,这是在应用程序的安全存储商店。到该文件的路径是/data/data/com.mycompany.myapp/files/log.zip。该文件的权限已被chnged到MODE_WORLD_READABLE,并启动电子邮件的意图是:

My app has an option to send out the log, which is store in the app's secure storage. The path to the file is "/data/data/com.mycompany.myapp/files/log.zip". The file's permissions have been chnged to MODE_WORLD_READABLE, and the intent to launch email is:

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("application/zip");
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///data/data/com.mycompany.myapp/files/log.zip));
startActivity(Intent.createChooser(i, "Send Error Log"));

如果该文件位于SD卡上,没有任何问题。但是,当它的安全存储,没有附件。我是pretty确保它不是一个premissions问题,因为它与股票的电子邮件客户端,并与着陆交易所的应用程序完美的作品。这是唯一的Gmail出现此问题。这是Gmail中的故障,还是我失去了一些东西?

If the file is located on the SD card, there is no problem. But when it's secure storage, there is no attachment. I'm pretty sure that it's not a premissions issue because it works perfectly with the stock email client and with the TouchDown Exchange app. It's only Gmail that has this problem. Is this a glitch in Gmail, or am I missing something?

感谢。

推荐答案

没关系,我找到了答案 - Gmail不允许任何附件,除非他们来自SD卡。我最后不得不将文件复制到外部存储cachce,然后一切工作。它吮吸,Gmail的任意决定,它不会对insternal存储使用的文件,即使权限是正确的!

Nevermind, I found the answer -- Gmail does not allow any attachments unless they come from the SD card. I ended up having to copy the file to external storage cachce, and then everything worked. It sucks that Gmail arbitrarily decides that it won't use files on insternal storage, even if permissions are correct!

这篇关于从我的应用程序从附加安全存储的文件在Gmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆