hey all:
  now I use smack to talk with gtalk api service vi XMPP, I want to
use Gmail Notifications, when I sent iq msg to the service, i cant get
any result, please help me.

        public void getemail()
        {
                GmailNotify notify=new GmailNotify();
                notify.setFrom(connection.getUser());
                notify.setTo("[EMAIL PROTECTED]");
                notify.setPacketID("mail1");
                notify.setType(IQ.Type.GET);
                connection.sendPacket(notify);
        }

        class GmailNotify extends IQ
        {
                public String getChildElementXML()
                {
                        return "<query xmlns='google:mail:notify' />";
                }
        }

the xmpp msg:

send:
<iq id="mail1" to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]/
Smack7756CBC6" type="get">
  <query xmlns="google:mail:notify"/>
</iq>

get:
<iq id="setting1" to="[EMAIL PROTECTED]/Smack7756CBC6"
from="[EMAIL PROTECTED]" type="result"/>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to