多个图像共享电子邮件

时间:2015-08-04 08:29:43

标签: java android

这里我试图在email.i中共享多个图像。我已经完成了以下代码。

            Intent shareIntent = new Intent();
            shareIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {"chirag.solanki@gmail.com"});
            shareIntent.putExtra(Intent.EXTRA_SUBJECT, "That's Testing of list");
            shareIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
            shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imgUri);
            shareIntent.setType("image*//**//**//**//*");
            startActivity(Intent.createChooser(shareIntent, "Share images to.."));

所有工作正常但附件变为空。为什么发生这种情况我不知道如果有任何人有任何可行的解决方案,请帮助我。

注意::服务器中的图像存储不在Local.Image路径中,如下所示

图片路径:: http://first.com/list/project_images/thumb/55c068d54eafb1438673109.jpg

这里imgUri是URI的

的ArrayList

1 个答案:

答案 0 :(得分:0)

我会这样做(Uri.parse对我有用):

shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(photoPath));