Gmail: New E-mail Notification

Hi !

I’am looking for way to check count of new e-mail on custom gmail inbox. On:

i get query but I can’t find any “code example” how I can send custom XML query to Jabber by Smack API. Is anyone help ?

While Smack doesn’t have any -direct- support for gmail mail notifications, I did implement extensions for this in the IM Gateway plugin. Take a look at the IM Gateway plugin source …/gateway/protocols/xmpp In XMPPSession you’ll see some custom gtalk extensions for mail notification, as well as under the packet directory you’ll see a number of extension classes built to handle Google related functions.

I have not checked out any examples of how to do this, so I am not sure if they will help you out, but I wanted to let you know that I just implemented this for the Yakkle client by just following the google documentation (that you referenced in you post) that you mentioned.

I am sorry that my company will not let me share the code, but I can tell you that all that is really necessary is to write two IQ providers (one for the new-mail and one mailbox) that simply parse the IQ, and an extension to org.jivesoftware.smack.packet.IQ for ‘google:mail:notify’. I am sure that there are example out there on how to do something very similar.


Browsing the source directory I couldn’t find out the path you mentioned.

Do you have still available Gmail extensions you were talking about?

Many thanks,