android:通过电子邮件发送 XML 字符串(内存文件)作为附件

发布于 2024-08-25 09:23:49 字数 110 浏览 5 评论 0原文

如何在 Android 中将 XML 字符串(或内存中的文件)作为文件附件通过电子邮件发送,而不实际创建物理文件?

我只想构建一个 XML 数据字符串(备份数据)并让用户通过电子邮件发送它。

How can I email an XML string (or an in-memory file) in android as a file attachment without actually creating a physical File?

I want to just build an XML data string (backup data) and have the user email it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甚是思念 2024-09-01 09:23:49

如果您想使用 Intent.ACTION_SEND,我几乎可以肯定简单的答案是您不能。

如果必须,那么您将必须使用 JavaMail 的 Android 端口来实现您自己的邮件发送器,或者您可以从头开始构建一个新的邮件发送器。

If you want to use Intent.ACTION_SEND, I am almost sure that the simple answer is that you can't.

If you must, then you will have to implement your own mail sender using, perhaps, an Android port of JavaMail or you can build a new one from scratch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文