简体   繁体   English

android + smack + openfire

[英]android+smack+openfire

I have some doubts in getting the open server information to java program 我对将开放服务器信息获取到Java程序有一些疑问

  1. dispalying the already existing users to newly registred user 将现有的用户转移到新注册的用户
  2. add and delete from groups 从组中添加和删除

For the first part: Usually, a user will only see his own contacts (in jabber terms: roster ). 对于第一部分:通常,用户只会看到他自己的联系人(以jabber形式: roster )。 If you maintain a xmpp server for a small community, you could implement a custom registration process: 如果为小型社区维护xmpp服务器,则可以实施自定义注册过程:

  1. Create a group "allUsers" that will contain all users 创建一个包含所有用户的组“ allUsers”
  2. for each new user 2.1 create a new user account 2.2 add the user to that group 为每个新用户2.1创建一个新用户帐户2.2将用户添加到该组

As a result, all members of the "allUser" group should be on the users roster 结果,“ allUser”组的所有成员都应位于用户名册上

(Never did it myself and it may be necessary to implement this custom registration routine on the openfire server directly, because I fear, that the xmpp protocol does not support adding to and deleting from groups) (我自己从未这样做过,可能有必要直接在openfire服务器上实现此自定义注册例程,因为我担心xmpp协议不支持在组中添加和删除)

you can use "Registration Plugin" which can be found in plugins tab of open fire. 您可以使用“注册插件”,该插件可以在明火的插件标签中找到。 Use that and change the registration settings to "add all registered users into a group" 使用它并更改注册设置以“将所有注册用户添加到组中”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM