Asmack can't keep online?

My server setup on public IP, I use asmack to connect my server on my android phone.

Problem is: the connection just keep 5 - 10 minutes. then the connection can’t automatic recovery.

please help me!

if you update to 4.0rc1, may be need to use PingManager

It looks like I have the same problem. I upgraded my android app from asmack 0.8.10 to 4.0rc1 and it usually works ok, but I also noticed some strange things:

It appears that the connection dropped, but I still see the session entry in openfire, I can send data from my android, but initially does not seem to work, but then all of a sudden, some old messages come at once (even if those messages are a few minutes old).

I went back to version 0.8.10 because 4.0rc1 does not keep the connection as long as 0.8.10 does (?).

Does anyone know whtas going on?

Cheers,

Philipp

EDIT: I was wrong. My issue also happens on the version 0.8.10. Sorry for the confusion. I’ll investigate further …

It appears that the connection dropped, but I still see the session entry in openfire, I can send data from my android, but initially does not seem to work, but then all of a sudden, some old messages come at once (even if those messages are a few minutes old).
The important question is: Did the data you send came also through with the “old messages”? If so, then you simply described high latency which is not unusual in mobile environments.

I went back to version 0.8.10 because 4.0rc1 does not keep the connection as long as 0.8.10 does (?).

Does anyone know whtas going on?

Hard to tell without further information. It’s even hard to tell what you mean with “keep the connection”. What do you experience? connectionClosedOnError? a stale TCP connection? someting else? There are many places in a typical mobile environment scenario which could cause at least an unclean disconnect because of some sort of timeout.

Did you configure PingManager to send periodic pings? I recommend an interval of about 30 minutes, but I have reports of some mobile carriers terminting a TCP conneciton after only 2 minutes of inactivity. Using a low ping interval will, of course, drain you battery faster.