문제

- 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