我想通过function inherit(o){
function F(){}
F.prototype = o;
return new F();
}
var foo = {
name: 'some'
}
var bar = inherit(foo); // bar.name refers to the object on foo
分享Html
文字。我写的代码如下。
whatsapp intent
但是在Intent选择器列表中没有显示whatsapp应用程序。
有人能建议我解决方案吗?
答案 0 :(得分:3)
试试这个
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setPackage(com.whatsapp);
sendIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(new StringBuilder()
.append("<p><b>Some Content</b></p>")
.append("<small><p>More content</p></small>")
.toString()));
sendIntent.setType("text/html");
context.startActivity(sendIntent);
答案 1 :(得分:0)
请在您的代码中更改此内容,并告诉我它是否对您有帮助,
sendIntent.setType("*/*");