Smack 4.1 Coninuously sending presence update

Hello all,

I have recently moved from 4.0.4 to 4.1.4. Presence change callback is getting called continuously. After checking logs I found that framework is sending presence packet continuously.

Below logs I see repeatedly while no presence is being updated from the client:

D/SMACK: SENT (0): Online

D/SMACK: SENT (0):

D/SMACK: RECV (0): Online

D/SMACK: RECV (0):

D/SMACK: RECV (0): Online

I have checked the forums but I could not find a single post where such a problem is being reported.

How to notify avatar change to other users?

Any help is appreciated, thanks in advance !!!

BR,

Vineet

Guys, I have found why the presence change listener was getting called repeatedly:

A loop was getting created when I was going to fetch current presence status of any user due to the below code:

LastActivityManager lam = LastActivityManager.getInstanceFor(xmppconnection);

lam.enable();

When lam.enable(); gets executed, it is getting presence change listener called forming a loop.

Thanks a lot guys for giving this problem a try.

I am still looking for optimal way how to notify avatar change to other users.

For avatar change XEP-0153 can be implemented:

XEP-0153: vCard-Based Avatars