与具有2000到3000个印地文字符的WhatsApp共享文本 [英] Sharing text to WhatsApp having 2000 to 3000 characters in hindi font
本文介绍了与具有2000到3000个印地文字符的WhatsApp共享文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试共享一个长度超过3000个字符的大文本.但是,我无法将所有文本发送到WhatsApp.
I am trying to share a big text having a length of more than 3000 characters. However, I am unable to send all the text to WhatsApp.
我的代码仅与WhatsApp共享1000个字符.
My code shares only approximately 1000 characters to WhatsApp.
这是代码:
Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType("text/plain");
whatsappIntent.setPackage("com.whatsapp");
whatsappIntent.putExtra(Intent.EXTRA_TEXT,data);
推荐答案
try{
Uri uriUrl = Uri.parse("whatsapp://send?text="+text+"");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
catch(ActivityNotFoundException e){
Toast.makeText(getActivity(), "Whatsapp Not Installed.", 2000).show();
}
我在阿拉伯文字上也遇到了同样的问题.使用此代码.它为我工作.
I was facing the same problem with Arabic text. Use this code. it worked for me.
这篇关于与具有2000到3000个印地文字符的WhatsApp共享文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文