我要附加图像的电子邮件,该图像存储在 /data/data/mypacke/file.png
。我怎么可以附加图像文件编程?什么样code样子?
I want to attach an image with email, that image is stored in /data/data/mypacke/file.png
. How can I attach that image file programmatically? What would sample code look like?
使用Intent.ACTION_SEND手的形象给另一个程序。
Use Intent.ACTION_SEND to hand the image off to another program.
File F = new File("/path/to/your/file.png");
Uri U = Uri.fromFile(F);
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("image/png");
i.putExtra(Intent.EXTRA_STREAM, U);
startActivity(Intent.createChooser(i,"Email:"));
上一篇:如何测量在Android GPS信号强度?强度、测量、信号、GPS
下一篇:无法在机器人工作室进口org.apache.http.Htt presponse机器人、工作室、org、apache