Skip to content

Instantly share code, notes, and snippets.

@bangarharshit
Last active December 6, 2015 03:57
Show Gist options
  • Save bangarharshit/f89ef2f1fd0065a4fe41 to your computer and use it in GitHub Desktop.
Save bangarharshit/f89ef2f1fd0065a4fe41 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
*/
xmppConnection.addStanzaAcknowledgedListener(new StanzaListener() {
@Override
public void processPacket(Stanza packet) throws SmackException.NotConnectedException, InterruptedException {
removePacket(packet.getStanzaId());
}
});
xmppConnection.setUseStreamManagement(true);
xmppConnection.setUseStreamManagementResumption(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment