I am using Tigase server and smack library ( for android on client side ). In Tigase when user A send a message to user B and if user B is offline it store the message in database and send to user B later when it comes online again. I want to add one more functionality in this that when user B is offline server must tell user A that user B is offline and message will be delivered when he will come online.
Thanks
It is possible, just use AMP: http://xmpp.org/extensions/xep-0079.html which is fully implemented on the Tigase server and should be activated by default. AMP gives you features to do precisely what you are asking for and much more. On the server side the AMP is implemented in such a way that it is very easy to extend. You just have to write/plug your own conditions, actions and other stuff.