Enabling stream management to use it in smack android application openfire v4.7.3

26 Views Asked by At

I encountered an issue where messages are not delivered when the Wi-Fi or cellular data is turned off on an Android device. Even after re-enabling the network connection, the messages remain undelivered. How can I address this situation in the code using Openfire and Smack?

1

There are 1 best solutions below

0
Guus On

Both Smack and Openfire support the Stream Management feature (as defined in XEP-0198: Stream Management).

In Smack, you can enable it using this method:

XMPPTCPConnection connection = new XMPPTCPConnection(config);
connection.setUseStreamManagement(true);

However, I believe that, by default, this already is enabled.