How can I get username of a gtalk user using XMPP with google appengine?
I am using google appengine for my gtalk agent , I want to get the username of the gtalk user how can I get it ?
for your reference, check this
XMPPService xmpp = XMPPServiceFactory.getXMPPService(开发者_StackOverflow中文版);
//STEP 2
Message msg = xmpp.parseMessage(req);
JID fromJid = msg.getFromJid();
I am using the above things in the beginning .....
The JID is composed of user@domain/resource
. The resource is optional, and provides more information about how the user is communicating (e.g. desktop or client app).
EDIT: See the Java JID class
精彩评论