0

我使用此代码加入 WhatsApp 中的群组,但如果我已经在群组中,那么在打开后我会收到一个我已经在群组中的祝酒词。怎么开组不吐司怎么开组?

Intent intentWhatsAppGroup = new Intent(Intent.ACTION_VIEW); Uri uri =
Uri.parse("whatsapp://chat?code=***GroupID***");
intentWhatsAppGroup.setData(uri);
intentWhatsAppGroup.setPackage("com.whatsapp");
startActivity(intentWhatsAppGroup);
4

1 回答 1

0

您必须使用群组 whatsapp 链接。在您的代码中,您必须有一个用户可以粘贴组链接的地方,然后在您的代码中更改解析 Uri 的行

Uri.parse("https://chat.whatsapp.com/<group_link>");
于 2019-02-04T14:51:41.407 回答