powered by Jive Software

How can i keep connection to openfire server always open even when activity is closed (android)

Hi all please i am working on an android chat application with smack 4.2.2 client, chat message works fine but sometimes socket connection to the server is closed. Please how can i keep an unending open connection to the server for as long as i want?.. Any help will be appreciated.

You probably can not. At least not on the TCP level. But using XMPP Stream Management you can keep an stream ongoing over multiple subsequent TCP connections. That means you have to react to transport layer events and act accordingly.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.