add caption to image on new whatsapp ver 2.11.399 (android)

丶灬走出姿态 提交于 2019-12-09 16:58:00

问题


Friends,

On android "whatsapp messenger" version 2.11.399 (Sep 30, 2014) it is possible to add a caption (textual decription) to a shared image.

I share image via intent as follows:

Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("image/jpeg");
Uri imageUri = Uri.fromFile(file);
share.putExtra(Intent.EXTRA_STREAM, imageUri);
//share.putExtra(Intent.EXTRA_TEXT, "This is my text to send."); // NOT WORKING
startActivity(share);

How can I add the text to the image caption?


回答1:


@robert I was passing those parameters in older version and it just sending image but when I update my Whats app version with 2.11.432 And now it's showing me both Image and text as caption. I was noticed that In was not showing in 2.11.399 or any older version. Just try to update your whats app and let me know is it works or not!! Your code is right just send one extra text also

share.putExtra(Intent.EXTRA_TEXT,shareBody);
share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(yourFile));


来源:https://stackoverflow.com/questions/26198732/add-caption-to-image-on-new-whatsapp-ver-2-11-399-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!