Change my status

Hi there,

I’m developing a small application using Smack. I hava all the basic stuff implemented but I have a major problem. I can’t find out how to change my status(pesence) so that everyone on my roster to know that I’m “away”/“dnd” etc. Any hints or sample code will be appreciated.

Thank you in advance,

astrognom

Create a Presence packet with the properties you want and send it over XMPPConnection.sendPacket().

Presence initial = new Presence(Presence.Type.available, "Here I am", 5, Presence.Mode.available);
        con.sendPacket(initial);