发送图像和文本使用ACTION_SEND或ACTION_SEND_MULTIPLE [英] Send Image and Text both using ACTION_SEND or ACTION_SEND_MULTIPLE
问题描述
- :我们曾试图发布的图片和文本使用下面的code:
- We have tried to post image and text using the below code:
final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
shareIntent.setType("image/png");
shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse("file:///mnt/sdcard/UserImages/"+ ParseUser.getCurrentUser().getObjectId() + ".png"));
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Hello test");
startActivity(Intent.createChooser(shareIntent,"Share"));
- :我们已经使用也尝试 shareIntent.setType(* / *)
,但仍没有运气
- We have also tried using shareIntent.setType("*/*")
, but still no luck.
- :当我们正试图发布此对电子邮件
,只有文字是出现在里面,当我们试图张贴在的WhatsApp
则只有图像是可见的。
- When we are trying to post this on email
, only text is appearing in it, and when we tried posting it on whatsapp
then only the image was visible.
- :我们无法在一起后两者,任何人都可以提出这样做的正确方法
- We are unable to post both together, can anyone suggest the proper way of doing it.
非常感谢你在前进。
推荐答案
现在您的code,由于新的更新会的工作WhatsApp的,在此之前并没有接受这种意图(ACTION_SEND_MULTIPLE),因为它仅接受一个文件在同一时间。
Now your code gonna work due the new updates to whatsapp, before this didn't accept this kind of intent (ACTION_SEND_MULTIPLE) because it accepts only one file at a time.
这篇关于发送图像和文本使用ACTION_SEND或ACTION_SEND_MULTIPLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!