I am having trouble keeping a socket connection in my application for a long period. It seems to turn off after a short time (every 2 minutes), especially if it doesn't work.
It happens that I am writing an application with a chat function, and for this I need to save the Live connection socket for the life of my application. I already tried tricks such as a pinging server every minute, but then this represents a drain of (Blackberry) resources. Blackberry Push is not an option (since I have clients other than BB devices).
Please, does anyone know how I can solve this or still suggest another alternative way to do this?
[I am also interested in how instant messaging applications for mobile applications such as WhatsApp, Kiks, etc., manage to remove this without unnecessarily depleting resources (at least the Resource Monitor application does not cry)
source share