本文介绍了如何在xmpp的花名册中添加新好友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 smack.jar.我可以使用它与 gtalk 连接.使用 Roster.getentries()
我可以获得我的好友列表.但是我如何向我的朋友添加新朋友buddyList.是否有任何 API smack 公开以添加新用户?
Hi i am using smack.jar.I am able to connect with gtalk using it.Using Roster.getentries()
i can get my buddy list.But how can i add new friends to my buddyList.Is there any API smack exposes to add new users??
谢谢
推荐答案
我一直在使用它在标准 XMPP 服务器中创建新联系人(不知道 gtalk):
I've been using this to create new contacts in a standard XMPP server (can't tell about gtalk):
Roster roster = xmppConnection.getRoster();
// jid: String, user: String, groups: String[]
roster.createEntry(jid, user, groups);
这篇关于如何在xmpp的花名册中添加新好友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!