First of all I am quite new to Smack / Jabber. I am implementing an XMPP Client using the Smack library. As one of the features of the client I have invisible status, whereby I would like the logged in user to appear as offline to other users but still be able to see the statuses of others.
I am using privacy lists as illustrated in the official XMPP Spec at http://xmpp.org/extensions/xep-0126.html.
The problem I am facing is this:
When the logged in user sets his status to ‘Invisible’, I activate the ‘invisible’ privacy list and send a presence ‘unavailable’ to my roster. The user will be seen as ‘offline’ to other users. However, the logged in user does not receive status changes from other users while his ‘invisible’ list is activated.
I have also tried sending the presene before activating the ‘invisible’ privacy list but to no avail …
Can someone kindly help me with this problem?
I am setting the presence using:
presence = new Presence(Type.unavailable, null, 24, null);
The Privacy List is being created using:
PrivacyListManager privacyListManager = PrivacyListManager.getInstanceFor(connection); PrivacyItem item; List<PrivacyItem> list = new Vector(); item = new PrivacyItem(PrivacyItem.Type.subscription.toString(), false, 1); item.setValue("from"); list.add(item); privacyListManager.createPrivacyList("invisible", list);
Any help is very much appreciated.