- 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"));

- We have also tried using shareIntent.setType("*/*"), but still no luck.

- 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.

Thank you very much in advance.

没有正确的解决方案

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top