在ImageView的Andr​​oid的份额形象不保存在SD卡 [英] android share image in ImageView without saving in sd card

查看:99
本文介绍了在ImageView的Andr​​oid的份额形象不保存在SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想分享的图像的图像view.but我不想保存到SD卡。 但是,当我使用意向来分享我用code

I want to Share the image in image view.but i don't want save to SDcard. But when i use Intent to share i used code

Intent share = new Intent(Intent.ACTION_SEND);
                share.setType("image/jpeg");
                share.putExtra(Intent.EXTRA_STREAM,Uri.parse(path));
                startActivity(Intent.createChooser(share, "Share Image"));  

在此指定图像的SD卡位置路径

here Path specified location of image in sdcard

但我不希望保存图像...有可能的。

but i don't want save image ... is there possible ..

推荐答案

您也可以分享的媒体库内容提供商的URI(如果图像已经在手机上,或者如果它来自于网络,你可以分享URL(虽然它不是一样的效果)。

You could also share it as the Media Gallery content provider URI (if the image is already on the phone, or if it came from the web you could share the URL (although it's not the same effect).

但如果来自于网络,你直接去codeD为位图,现在想分享它作为一个合适的图像,是啊,你真的需要的文件!

But if came from the web and you directly decoded to Bitmap and now want to share it as a proper image, yeah, you really need the file!

这篇关于在ImageView的Andr​​oid的份额形象不保存在SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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