与位图对象发送电子邮件作为Android中的附件? [英] Send email with bitmap object as an attachment in Android?

查看:132
本文介绍了与位图对象发送电子邮件作为Android中的附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要发送的位图作为邮件的附件。图像没有存储在SD卡或设备中的任何地方。位图对象都在运行时创建,应作为附件发送。

I want to send the bitmap as an attachment in the mail. The image is not stored in SDCARD or anywhere in the device. The bitmap object gets created at runtime and that should be sent as an attachment.

推荐答案

然后,你必须保存位图到SD卡,然后将其附加到电子邮件(我猜,你的知道如何做到这一点)。

Then, you must save the Bitmap to the SDCard, and then attach it to the email (I guess, you know how to do so).

为什么要保存到SD卡的?这是因为电子邮件应用程序将不得不读取它的将要连接的文件;因此,您必须将路径和文件名传递给电子邮件客户端。正如任何其他应用程序,电子邮件客户端可以存储在自己的私有目录或SD卡只能访问文件。

Why is it necessary to save it to the SDCard? That's because the email app will have to read the file that it's going to be attached; thus, you have to pass the path and filename to the email client. As any other app, the email client can only access files stored in its own private directory or the SDCard.

这篇关于与位图对象发送电子邮件作为Android中的附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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