Search code examples
androidtextsubstring

android studio text length


I have news app , when i try to share the article using whatsapp it's cut the body of the article.

What's the limit of whatsapp text to be send without problem ?

how to split the limit character ?

      case R.id.action_share:
                        String shareBody = title_article +"\n\n"+video_article+" \n\n "+ android.text.Html.fromHtml(content_article).toString().replace("img{max-width:100% !important}","") +" \n\n قم بتحميل تطبيق المصدر الإخباري \n\n "+getString(R.string.url_app_google_play)+"واحصل علي اخر الأخبار  \n\n ";
                        Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                        sharingIntent.setType("text/plain");
                        sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
                        sharingIntent.putExtra(Intent.EXTRA_SUBJECT,  getString(R.string.app_name));
                        startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name)));
                        return  true;
}

Solution

  • Just put the text on virable and it should work perfectly