We are using XMPPFramework & Openfire(Version: 4.6.2) for our application.
After killing the application or putting it into background mode, it still shows that the user online for few minutes, then after it became offline.
We have tried with Idle Connections Policy time but still got nothing.
Suggestions will be welcomed.
I have faced similar issue in a project and after investigation it was found that it happens when using Stream Resumption feature (Stream Management XEP-0198).
If stream resumption is enabled when starting a new stream, Openfire will not immediately mark the user as Offline, instead it's session will be marked in Detached state. So the client app can resume the stream again without having to do full login.
If you will not use Stream Resumption, user will immediately become offline.
When enabling Stream Management, if client sends following packet, resumption feature is enabled on the stream.
<enable xmlns='urn:xmpp:sm:3' resume='true'/>
For this packet, server acknowledges by sending back:
<enabled xmlns='urn:xmpp:sm:3' id='some-long-sm-id' resume='true'/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With