When did the Presence Changed?

Is there any way to know when the Presence of a Buddy changed?

Thanks,

Partha

Hey Partha,

That feature is currently not supported. We can add a new feature that will trigger an event when the presence of a user has changed. You can then implement your own listener that will store the date of the change. Would that be ok for you?

Regards,

– Gato

Hi there,

Sounds good.

Just a quick Q:

Are u planning to introduce a new event or proposing to enhance the current presence notification payload with a timestamp?

Thanks,

Partha.

Hey Partha,

I filled JM-820 for this new feature and implemented it during the weekend. All you need to do is implement the PresenceEventListener interface and register it with PresenceEventDispatcher. Check the javadoc of those classes to learn about supported events and how to use them.

Regards,

– Gato

Hi Gato,

Thanks for the enhancements…

Just a few Qs …if u could answer:

  1. How is this going to work in this scenario: My Buddy is already logged in. I log in. I get a presence of My buddy. Will this presence bear the information as to when he changed the his presence to the most current state? (e.g. Lets say he changed from Available to DND). I want to know when my buddy changed his presence to DND.

PS: I’‘m trying to get this on my client using Smack APIs and I’'m using Wildfire Server.

Thanks,

Partha.