powered by Jive Software

Handling lost connection with smack

hii all,

Now, i develop an android messenger, and i use smack for API to connect with openfire.

But, I have some question :

  1. some time client A send message to **client B **and Client B receive the message, and some time Client B can’t receive a message from **Client A, **what i must to do to fix this condition?
  2. in stand by condition, some time i having a lost connection to internet, and then reconnect again, but my roster showing offline for all user. how to make handling to reconnect to server / restore session if some time i having lost connection?

I hope any one can help me to solve this problem .

Thank you

Hi There,

Are you using smack or aSmack?

Have you created your own packet listeners?

What do you mean sometimes client B does not receive? Are there any conditions that are the same when this happens or does it seem to happen at random?

What server are you using?

What is a standby condition?

If you are reconnecting yourself are you sending a new presence message?

Are you using an emulator or a physical android device?

If you are using a reconnect manager you need to load it in your application code as in Android it won’t load static code at runtime.

Asmack is being managed by Flow, he’s posted some info here.