我想通过 whatsapp intent
分享 HTML
文本。我编写的代码如下。
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"));
但是WhatsApp应用程序没有显示在意图选择器列表中。
有人可以给我建议解决方案吗?