Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不实际创建物理文件的情况下通过电子邮件将 android 中的 XML 字符串(或内存中文件)作为文件附件发送?
我只想构建一个 XML 数据字符串(备份数据)并让用户通过电子邮件发送它。
如果你想使用 Intent.ACTION_SEND,我几乎可以肯定简单的答案是你不能。
如果必须,那么您可能必须使用 JavaMail 的 Android 端口来实现您自己的邮件发送器,或者您可以从头开始构建一个新的发送器。