2

我想在android中实现非常有效的群聊。我怎样才能做到这一点?请给我您最好的建议,并且一些分步教程将帮助我。

我想做点对点聊天和群聊。所以我想实现这两种类型的实现。那里有任何 SDK 可用吗?或者有任何java lib吗?

请给我你最好的建议。

谢谢,杰伊帕特尔

4

3 回答 3

2

首先查看 Google 自己的Google Cloud Messaging。这使您可以将消息推送到其他设备。在那之后,你可以谷歌,看看你是否找到任何例子教程,你很高兴!

于 2012-08-16T05:18:36.623 回答
2

这是使用Applozic后端服务器和聊天 SDKS 开发的 Android 聊天 SDK 的示例代码。 https://github.com/AppLozic/Applozic-Android-SDK

PS:我来自Applozic

于 2016-05-06T06:49:57.073 回答
0

您需要提交这样的表格来创建一个持久组:

私人无效setConfig(MultiUserChat multiUserChat){尝试{

    Form form = multiUserChat.getConfigurationForm();
    Form submitForm = form.createAnswerForm();
    for (Iterator<FormField> fields = submitForm.getFields(); fields.hasNext();) {
        FormField field = (FormField) fields.next();
        if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) {
            submitForm.setDefaultAnswer(field.getVariable());
        }
    }
    submitForm.setAnswer("muc#roomconfig_publicroom", true);
    submitForm.setAnswer("muc#roomconfig_persistentroom", true);
    multiUserChat.sendConfigurationForm(submitForm);

} catch (Exception e) {
    e.printStackTrace();
}

}

于 2015-05-06T06:38:40.637 回答