【发布时间】:2013-06-14 04:17:12
【问题描述】:
我有这个代码:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
startActivity(intent);
这将在 Android 上成功启动消息应用程序。
但是在启动意图时如何附加位图对象?
我已阅读http://developer.android.com/reference/Android/content/Intent.html, 我需要的壁橱里的东西是EXTRA_STREAM,就像这样:
intent2.putExtra(Intent.EXTRA_STREAM, _uri);
但我的情况是,我有一个 Bitmap 对象的引用,而不是 Bitmap 的 URI。
请告诉我如何附加位图对象?
【问题讨论】:
-
你要发送图片吗??
-
保存该位图并提供 uri ....
-
@segi :: 是的,我想发送图片。
-
@Triode:我不知道 URI 因为我刚刚使用 dev cam 拍摄了图像