【问题标题】:how to create a group on openfire from coding in android如何从android中的编码在openfire上创建一个组
【发布时间】:2013-02-09 00:07:34
【问题描述】:

我使用 smack api、XMPP、openfire 创建了一个小型聊天应用程序,我想创建一个群聊工具。 我可以通过向导投掷在 openfire 上创建一个组,但我想通过 android 中的编码在 openfire 中创建一个组。

【问题讨论】:

    标签: android openfire smack


    【解决方案1】:

    the smack documentation 中所述,您可以创建一个新的群聊即聊天室,如下所示:

    MultiUserChat muc = new MultiUserChat(conn1, "myroom@conference.jabber.org");
    muc.create("testbot");
    muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
    

    如果你指的是用户联系人列表中的组,那么你也可以这样做:

    roster.createGroup("groupName");
    

    其中roster 是对登录用户名册的引用。

    【讨论】:

      猜你喜欢
      • 2015-07-28
      • 2023-03-05
      • 1970-01-01
      • 2015-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多