Smack XMPPConnection 的简单使用
来源:互联网 发布:javascript自学网站 编辑:程序博客网 时间:2024/05/26 07:28
String xmppHost = “127.0.0.1”;
int xmppPort = 5222;
// Create the configuration for this new connection
ConnectionConfiguration connConfig = new ConnectionConfiguration(xmppHost, xmppPort);
connConfig.setSecurityMode(SecurityMode.required);
connConfig.setSASLAuthenticationEnabled(false);
connConfig.setCompressionEnabled(false);
XMPPConnection connection = new XMPPConnection(connConfig);
xmppManager.setConnection(connection);
try {
// Connect to the server
connection.connect();
Log.i(LOGTAG, "XMPP connected successfully");
// packet provider
ProviderManager.getInstance().addIQProvider("notification", "androidpn:iq:notification", new NotificationIQProvider());
} catch (XMPPException e) {
Log.e(LOGTAG, "XMPP connection failed", e);
}
- Smack XMPPConnection 的简单使用
- xmpp的XmppConnection类
- xmpp用户注册时报错:at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:488)
- smack·的简单应用
- xmppconnection的login方法时报错
- 【openfire,smack使用总结】--Smack库的使用
- aSmack连接服务器异常smack.SmackException$ ConnectionException thrown by XMPPConnection.connect();
- Smack 中 ConnectionListener 的作用和使用
- Smack 中 ConnectionListener 的作用和使用
- 一个简单的openfire+smack的学习分享
- 利用smack实现基于XMPP协议的简单通信demo
- smack api 使用
- Android Studio 使用smack
- androidpn和smack的关系与使用上的差别
- android 环境使用smack 必须注册的组件
- IM项目,使用openfire服务,Smack的android端概述
- Android 使用Smack+openfire开发基于XMPP协议的聊天
- openfire+smack简单实时通信
- Java的位运算符详解实例——与(&)、非(~)、或(|)、异或(^)
- getContentLength()为-1 解决方法
- linux网卡驱动分析之驱动加载
- mongodb备份
- Oracle 并行(Parallel)
- Smack XMPPConnection 的简单使用
- <java——多态、内部类>
- dsfljggk;h
- 二维码的扫描与生成
- Diffie-Hellman密钥交换 -- 浅析
- 已经达到了键随心动的境界
- 【C++ Primer】特殊工具与技术
- visualSVN server绿化策略 摆脱两个apache的尴尬
- usb 项目经验