SMACK 和 Google 环聊 - 收听邀请
SMACK and Google Hangouts - Listen for invitations
有谁知道 SMACK 是否可以监听群聊邀请?
我试过添加监听器
MultiUserChat.addInvitationListener(...)
我试过手动加入房间,然后在代码中尝试:
for (String room : MultiUserChat.getJoinedRooms(connection, connection.getUser())) {
dLog(String.format("%s -> getJoinedRooms? %s", getUsername(), room));
}
但我从未在日志中看到任何内容。所以问题是,SMACK 可以用来收听 Google 环聊中的群聊吗?
相关链接我都看过了,比如:https://www.igniterealtime.org/builds/smack/docs/4.0.0/documentation/extensions/muc.html and https://www.igniterealtime.org/builds/smack/docs/4.0.0/javadoc/org/jivesoftware/smackx/muc/MultiUserChat.html
与 GTalk 不同,环聊不基于 XMPP。所以你不能在这里使用像 Smack 这样的 XMPP 库。
有谁知道 SMACK 是否可以监听群聊邀请?
我试过添加监听器
MultiUserChat.addInvitationListener(...)
我试过手动加入房间,然后在代码中尝试:
for (String room : MultiUserChat.getJoinedRooms(connection, connection.getUser())) {
dLog(String.format("%s -> getJoinedRooms? %s", getUsername(), room));
}
但我从未在日志中看到任何内容。所以问题是,SMACK 可以用来收听 Google 环聊中的群聊吗?
相关链接我都看过了,比如:https://www.igniterealtime.org/builds/smack/docs/4.0.0/documentation/extensions/muc.html and https://www.igniterealtime.org/builds/smack/docs/4.0.0/javadoc/org/jivesoftware/smackx/muc/MultiUserChat.html
与 GTalk 不同,环聊不基于 XMPP。所以你不能在这里使用像 Smack 这样的 XMPP 库。