Example :
package com.vincenzoamoruso.notifier;
import java.util.logging.Logger;
import com.google.appengine.api.xmpp.
import com.google.appengine.api.xmpp.
import com.google.appengine.api.xmpp.
import com.google.appengine.api.xmpp.
import com.google.appengine.api.xmpp.
import com.google.appengine.api.xmpp.
public class XMPPNotifier {
private static final Logger log = Logger.getLogger(XMPPNotifier.
public boolean sendXMPP(String toID,String Message,boolean tryByMail){
JID jid = new JID(toID);
String msgBody = Message;
Message msg = new MessageBuilder()
.withRecipientJids(jid)
.withBody(msgBody)
.build();
boolean messageSent = false;
XMPPService xmpp = XMPPServiceFactory.
if (xmpp.getPresence(jid).
SendResponse status = xmpp.sendMessage(msg);
messageSent = (status.getStatusMap().get(
}
if (!messageSent) {
System.out.println("Non Inviato");
log.warning("Non Inviato");
}
return messageSent;
}
}
venerdì 30 ottobre 2009
Google XMPP gTalk Notifier
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento