powered by Jive Software

How to Subscrib to get the updated presence in smack

Hi I am developing a chat app based on smack api.I want to get the presence of all contacts in my roster.To get Get this am i need to subscribe.

If yes,How i can set subscription inorder to get the status(i.e presence).Could u plz send me the code if possible.I need it urgent.

And How can we send the message to the contact in my roster.