powered by Jive Software

Asmack disconnecting from MUC when phone goes to sleep

Hi Guys,

I managed to do great stuff with asmack except one anoying thing - 10-15 minutes after my phone goes to sleep, the connection to the MUC is lost even though I marked in OpenFire’s console that clients shoud NOT disconnect when IDLE.

Has anyone encountered that and what is the best way to solve that issue?

Thanks a lot


Your server or some network device is probably dropping the TCP socket connection. Is the phone supposed to maintain the socket while asleep?

The socket is probably dropped as you suggested but my requirement is that the connection to the MUT will sustain. I managed to get a much better results by putting my service in the foreground (only when the phone goes to sleep). I wonder if there are better ways to do that…

Once the socket is dumped, openfire will dump the session regardless of any settings. You need to look into BOSH to maintain the long duration sessions.

Thank you for your reply. Can you give me some reference to this “BOSH”?