jjzjj

ConnectionConfiguration

全部标签

java - 使用 smack 连接到 Google Talk

我想开发一个连接到GoogleTalk并允许用户与其friend聊天的Java应用程序。我正在使用smackAPI和以下代码:ConnectionConfigurationconfig=newConnectionConfiguration("talk.google.com",5222,"gmail.com");SASLAuthentication.supportSASLMechanism("PLAIN",0);XMPPConnectionconnection=newXMPPConnection(config);try{connection.connect();}catch(XMPPEx

android - 无法将 Android 客户端与本地 XMPP 服务器连接

这是关于帖子here我能够将我的PC连接到本地的本地tigase服务器设置(我正在使用SmackAPI)。现在,当我想通过Wi-Fi将Android手机连接到该服务器时,我遇到了问题。我可以使用客户端Beemforandroid连接到本地服务器。服务器的XMPP域名是我的PC名称“mwbn43-1”,IP地址是“192.168.0.221”(我可以从安卓终端模拟器)。在Beem设置中有一个高级选项,我可以在其中指定我想要连接的服务器(我已将其作为IP地址给出)。如果我不设置此选项,我将无法连接。现在这里是我用于我的android客户端的代码。XMPPConnection.DEBUG_E