powered by Jive Software

Smack 2.2.1 and Roster.getPresence


I’'m maintaining an application using Smack 2.2.1, and the need to check whether someone as requested presence subscription requests has come up. So, I was wondering, if someone has sent me a presence subscribe packet, if I then call Roster.getPresence() for that user, will it return null, or Presence.Type.SUBSCRIBE?



I’‘m not sure what the answer is, and the answer is probably different under Smack 3.0. If you get a chance, we’'d love to know with a follow-up post.


Hi everyone,

I checked the smack 2.2.1 source out of svn today, and looked at the Roster class, and I discovered that the Roster ignores presence subscriptions if the subscription mode is set to manual (as it is in my application). Which is a pity for me, but I suppose it isn’‘t usually necessary, and would be a waste of memory in most applications. Anyway, it’'s easy for me to keep track of, was just hoping that smack would do me the favor