Android 版 gtalk 中的群聊
我正在使用 smack 3.2.1 API 制作 gtalk。 我陷入了群聊实施的困境。 这是我发起群聊的代码:
conf = new MultiUserChat(connection, "[email protected]"); // create object of multiserchat class
try
{ // Create the room
conf.create("[email protected]");
// Send an empty room configuration form which indicates that we want an instant room
conf.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
}
catch (XMPPException e)
{
Toast.makeText(this, "Error in create room: "+e.toString(), Toast.LENGTH_LONG).show();
}
conf.invite("userid", "Invitation for group chat");
但我收到错误:服务不可用(503)
提前致谢。
I am making gtalk Im using smack 3.2.1 API.
I am stuck with group chat implementation.
here is my code for initiate a group chat:
conf = new MultiUserChat(connection, "[email protected]"); // create object of multiserchat class
try
{ // Create the room
conf.create("[email protected]");
// Send an empty room configuration form which indicates that we want an instant room
conf.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
}
catch (XMPPException e)
{
Toast.makeText(this, "Error in create room: "+e.toString(), Toast.LENGTH_LONG).show();
}
conf.invite("userid", "Invitation for group chat");
But I am getting error: Service not Available (503)
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
房间应该是——私人聊天——
并且不需要创建房间。
只需使用用户名和密码即可加入房间。这将满足:
代码片段:
让我知道这是否有效。
Room should be -- private-chat-
And there is no need to create room.
Simply join the room with users name and password. That will satishfy:
Code snippet:
Let me know if this works.