How to share Html text to whatsapp intent

Viewed 6151

I want to share Html text via whatsapp intent. The code I have written is below.

Intent sharingIntent = new Intent(Intent.ACTION_SEND);
                sharingIntent.setType("text/html");
                sharingIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(new StringBuilder()
                .append("<p><b>Some Content</b></p>")
                .append("<small><p>More content</p></small>")
                .toString()));
                this.getContext().startActivity(Intent.createChooser(sharingIntent,"Share using"));

But whatsapp application is not showing in Intent chooser list.

Can anyone suggest me the solution?

2 Answers
Related