Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
shantheepan #1
Member since Sep 2011 · 15 posts · Location: Sri Lanka
Group memberships: Members
Show profile · Link to this post
Subject: How to unsubscribe and remove roster
hi,

I want to know the procedure of unsubscribe and remove roster from my list. For my knowledge first I called

xmppconn.PresenceManager.Unsubscribe(jid);

then it'll trigger the presence in corresponding client, than I do

xmppConn.RosterManager.RemoveRosterItem(pres.From);

But I want to know how exactly this operation can be performed. At least some steps please.

thank you
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
the code you posted is correct. You can send both requests at the same time in a row.

  1. Jid jid = "test@server.com";
  2. xmppconn.PresenceManager.Unsubscribe(jid);
  3. xmppConn.RosterManager.RemoveRosterItem(jid);

The jid must be a bare Jid.
Avatar
shantheepan #3
Member since Sep 2011 · 15 posts · Location: Sri Lanka
Group memberships: Members
Show profile · Link to this post
Thank you for your quick reply Alex.

I'm nearly got the idea to solve my problem. Thank you again.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS