how to add new buddy in roster in xmpp

后端 未结 2 740
名媛妹妹
名媛妹妹 2020-12-15 11:31

Hi i am using smack.jar.I am able to connect with gtalk using it.Using Roster.getentries() i can get my buddy list.But how can i add new friends to my buddyList

相关标签:
2条回答
  • 2020-12-15 12:05

    In XMPP, adding is adding to your roster + subscribing to the user. Updating is just adding the user to your roster. Keep in mind the minutiae.

    0 讨论(0)
  • 2020-12-15 12:12

    I've been using this to create new contacts in a standard XMPP server (can't tell about gtalk):

      Roster roster = xmppConnection.getRoster();
      // jid: String, user: String, groups: String[]
      roster.createEntry(jid, user, groups);
    
    0 讨论(0)
提交回复
热议问题