Presence unavailable and get status

Hi everyone!

This is my first steps in the smack community, so I’d like to greet everyone

Sorry, if this problem, already arrived here, but - believe me or not - I came throught a thousand of pages in google, and find only onesimilirar problem but it was about old Smack version and got no use for me.

Currently, I’m working on a Jabber client in Java with Smack API for my college project.

And I’m currently working on a roster list, my problem is that i want to display a text status (description) of user who’s presence is unavailable. And I can’t, when user got presence which presence.getType() == Presence.Type.unavailable, and then when I’m trying to do presence.getStatus() its simply null, and i cant display it…

Maybe I misunderstood the role of Presence.Type and Presence.Mode, or something. Please, help me fix this issue.

PS: Please excuse me for my bad english, I’m not a native english speaker…

Are you sure that the person who went offline set a status when logging out? I’m not 100% sure that offline status is supported persistently, i.e. it is retrievable when going through the roster. I know that you can send a ‘going offline’ status which can be intercepted by your PacketListener if you’re not filtering out the status messages. I also know that you can acces online friends’ statuses via the roster as you described above so your approach is fine.