Handle fluctuating networks on phone

I am working on a mobile application which connects to OpenFire server. As the mobile network connection might not be stable, there are frequent disconnections from internet. As a result of this, messages are not delivered to users on mobile devices and I need to check for connection and re-connect every 15 seconds.

Is there a way to implement this in a better manner and handle it more effectively?

You are posting in the Dev forum, so not sure what you need (do you want to implement something on the Openfire side). Most probably you are just looking for some options. There is stream management and delivery receipts. So, your mobile application needs to implement one of these. Explanation: options to mitigate messages loss because of network problems

I guess you are correct. I have posted it in wrong place. I want to ensure that the client always maintains a persistent connection.