Our team has working on IM app based on XMPP. We have used smack for that on the client side. These are some important highlights about our connection.
- Client sends Pings every 5 sec to check the network connection.
- Client has used reconnectionManager from the smack library.
- Client also using Stream management.
We are observing the following problems.
- The connection on the mobile remains for 6 to 7 hours but then it disconnects and does not reconnect.
- Pings from the server are failing after a long period of connectivity.
- The ReconnectionManager is trying the multiple reconnects and enables a new stream 5 to 9 times and then sends the request which is totally not expected.
What are the points we are lagging so that we can build a persisitent connection in android which remains for endless period of time.