我正在通过Eclipse添加的Smack API 4.0将XMpp连接写入我的XMpp服务器import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;public class XmppManager {public static final String HOST = "localhost";public static final int PORT = 5222;public static final String SERVICE = "chat";public static void main (String[] arg){...
我一直在使用smack客户端库4.1.8和xmpp服务器(openfire服务器)开发聊天应用程序,但是在尝试使用Accountmanger类创建新用户时,它引发了异常“ XMPPError:bad-request-Modify”XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder().setSecurityMode(ConnectionConfiguration.SecurityMode.disabled).setHost("127.0.0.1").setDebuggerEnabled(true).setPort(5222).setSendPresence(true).setServiceNam...
是否可以检查当前用户是否为管理员/如何检查当前用户详细信息?(Android中的Java smack openfire)?当我尝试在openfire管理网页上创建用户时.有一个选项:是管理员? (授予管理员对Openfire的访问权限)有可能知道当前用户是否具有对Openfire的管理员访问权限? (我的意思是,如何检查当前用户是OpenFire的管理员)解决方法:尝试这个,account = Connection.getAccountManager();Collection<String> attrs = account.getAccountAttribu...
这是我第一次使用Android / Java.我正在尝试运行此基本代码,但不断出现以下错误:
“找不到方法引用的类’org.jivesoftware.smack.ConnectionConfiguration’”
>我的代码:package message.pack;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;import android.app.Activity;
import android.os.Bundle;public class Thesi...
我已经在本地计算机上设置了我的开火(jabber服务器),其中有两个用户testuser1和testuser2.使用Spark客户端,两个用户都可以毫无问题地进行聊天,这很不错.
openfire IP -192.168.1.65
我想使用smack API(3.3.0)发送和接收消息.我已经写了发送方端代码来发送消息(使用testuser1)并在testuser2端接收到Spark客户端(带有testuser2)消息进行测试,但是当我尝试使用java代码接收发送方消息时,我无法接收这些发布消息.
Sender.javaimport or...
嗨,大家好.我刚刚开始在Java中使用XMPP,包括服务器端和客户端端.在服务器端,我使用的是Apache Vysper 0.7,在客户端,我使用的是Ignite Smack 3.1.0我正在使用apache vysper演示页面中的一个小型XMPP嵌入式服务器,使用源代码附带的TLS证书:XMPPServer server = new XMPPServer("localhost"); StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry(); AccountManagement accountManagement = (AccountMa...
我正在尝试设置一个java服务器,以便使用smack库与Google的Cloud Connection Server进行通信.我已通过Google API设置了应用ID和API密钥,并尝试使用以下代码:import javax.net.ssl.SSLSocketFactory;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.SASLAuthentication;
import org.jivesoftwar...
我连接到服务器(Xmpp)但无法在我的psi客户端发送和接收数据包
这是我的代码片段POSClientIQ posclientiq = new POSClientIQ();posclientiq.connectXMPPServer();posclientiq.processMessage();}public void processMessage(){ try{final IQ iq1 = new IQ() {public String getChildElementXML() {return "<iq type='get' from ='sam'><query xmlns='jabber:iq:roster'></query></iq>";}};iq1.setType(IQ.Type.GET);// PacketColl...
我正在开发一个使用Openfire XMPP服务器的聊天网站,客户端使用Smack API.使用Smack API的Web项目是使用Play实现的!框架使它RESTful.我选择了Play!因为它的异步编程产品(Comet Sockets / WebSockets).
基本上,到目前为止,我的架构如下所示:
Openfire< - >网络服务器< - >用户/浏览器.
为了支持Android设备,并最大化代码重用,我是否应该将XMPP客户端代码实现为网站和Android客户端常见的RESTful Web服务?
Openfire< - > Web服...
我正在尝试使用最新版本的Smack 4.1.0-beta创建一个XMPP客户端.但是当我尝试登录到本地运行的OpenFire服务器时,我遇到了错误.org.jivesoftware.smack.SmackException: SASL Authentication failed. No known authentication mechanisims.我尝试了各种用户凭证的组合,但到目前为止还没有运气.当尝试使用Pidgin或Adium连接到服务器时,可以.任何线索我在代码中缺少什么?XMPPTCPConnectionConfiguration config = XMPPTCPConnectionCo...