1

I am using smack for XMPP client library, I want to implement whatsapp group like functionality. So once I am in the group, I will be in there until I leave the group or admin removes me.

But while implementing this, I am able to join a group, but as soon as I get disconnected I need to rejoin manually in the group.

As much I have read(correct me if I am wrong), If I add conference in the bookmark with autojoin=true, it will automatically be joined on login. I am doing this programatically like this.

BookmarkManager bookmarkManager = BookmarkManager.getBookmarkManager(connection);
bookmarkManager.addBookmarkedConference(mucName, conferenceName, true, nickName, null);

Even if I am sending autojoin value to true, I am still not be able to auto joining in the group. I am using ejabberd server.

Can someone help...

Abhishek Patidar
  • 1,557
  • 1
  • 16
  • 25
  • Possible duplicate of [Autojoin option of xmpp bookmark does not work](http://stackoverflow.com/questions/24449272/autojoin-option-of-xmpp-bookmark-does-not-work) – legoscia Jan 27 '16 at 14:22
  • I don't think this is duplicate of the mentioned link. I do understand that I am discussing about same XEP-0048 - Bookmarks feature. But I have clearly tagged smack along with it. My question is related with smack implementation. As per the documentation it should have joined on login but it is not working as it should – Abhishek Patidar Jan 27 '16 at 16:53
  • The issue is not specific to any library or programming language - it's about how the XMPP protocol works. You'll have to join the rooms manually, even if they are marked with `autojoin`. – legoscia Jan 27 '16 at 16:56
  • @legoscia I guess I was not too descriptive. I got your point it should be manual but if a open source library is it will then, it should. Here is the [link](https://www.igniterealtime.org/builds/smack/docs/4.1.3/javadoc/org/jivesoftware/smackx/bookmarks/BookmarkManager.html#addBookmarkedConference(java.lang.String,%20java.lang.String,%20boolean,%20java.lang.String,%20java.lang.String)) – Abhishek Patidar Jan 27 '16 at 17:00
  • Right, it seems like the manual should be more explicit about what that does and doesn't do. Looking at [the source](http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/plain/protocols/bundles/org.jivesoftware.smack/src/org/jivesoftware/smackx/bookmark/BookmarkManager.java), that method only updates the bookmarks, and doesn't attempt to join the rooms. – legoscia Jan 27 '16 at 17:05
  • 1
    For now, I have done the manual way. But would like to get some response for why it so. – Abhishek Patidar Jan 27 '16 at 17:07

0 Answers0