简体   繁体   中英

android+smack+openfire

I have some doubts in getting the open server information to java program

  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 ). If you maintain a xmpp server for a small community, you could implement a custom registration process:

  1. Create a group "allUsers" that will contain all users
  2. for each new user 2.1 create a new user account 2.2 add the user to that group

As a result, all members of the "allUser" group should be on the users roster

(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)

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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