我正在致力于实现“Invite Friends”屏幕的android Intent类。 我为它使用了下面的代码。Android:使用Intents过滤邀请应用程序
上面的代码返回我的应用程序,如蓝牙,Flipboard的,脸谱,WhatsApp的等
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.invite_friends));
sendIntent.setType("text/plain");
Intent chooser = Intent.createChooser(sendIntent,getString(R.string.invite_send_tittle));
if (sendIntent.resolveActivity(getPackageManager()) != null)
{
startActivity(chooser);
}
我需要的是仅发送消息(短信,Whatsapp叽叽喳喳等)和电子邮件应用。 如何只获取消息和电子邮件应用程序?
总之,我正在寻找像WhatsApp这样的邀请选项。
感谢, 阿迪亚
http://stackoverflow.com/a/18585798/793943检查此答案 – Sush
@sush:谢谢你的回应。但我需要whatsapp在我们点击其邀请朋友链接时提供的所有邀请应用程序。 – AdityaJ