I am developing, chat application for android using ejabberd as XMPP server. I want to send GCM push notification, when user is offline. For that I am creating new module in ejabberd, registerd offline_message_hook, but this function gets called only when somebody starts typing and finishes typing. Below are the only packets passed to this hook. Although, user receive message when he/she comes online.
Packet: {xmlelement, "message", [{"type", "chat"}, {"id", "purple7d4d0773"}, {"to", "xxx@rakshith"}], [{xmlelement, "paused", [{"xmlns", "http://jabber.org/protocol/chatstates"}], []}]} Packet: {xmlelement, "message", [{"type", "chat"}, {"id", "purple7d4d0773"}, {"to", "xxx@rakshith"}], [{xmlelement, "composing", [{"xmlns", "http://jabber.org/protocol/chatstates"}], []}]}