Skip to content

Instantly share code, notes, and snippets.

@bangarharshit
Last active December 6, 2015 03:56
Show Gist options
  • Save bangarharshit/f2b1ab3ac7c6f58ad20b to your computer and use it in GitHub Desktop.
Save bangarharshit/f2b1ab3ac7c6f58ad20b to your computer and use it in GitHub Desktop.
/*
* The code is taken from ProjectMaxs. For details please look - https://github.com/ProjectMAXS/maxs/blob/73043374fa4ec0ce0d881bb8d42a241ef80fa9eb/transport-xmpp/src/org/projectmaxs/transport/xmpp/xmppservice/XMPPService.java
*/
final Roster roster = Roster.getInstanceFor(connection);
// Setup the roster store
File rosterStoreDirectory = FileUtil.getFileDir(mContext, "rosterStore");
RosterStore rosterStore = DirectoryRosterStore.init(rosterStoreDirectory);
roster.setRosterStore(rosterStore);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment