openfire

Check Online/Offline User of Openfire and auto accept friend request Using Android

时光怂恿深爱的人放手 提交于 2020-01-25 14:33:09
问题 I am using openfire server in android. Now I need to check how many users are online and who are they. My connection is OK. But when I check it the output is Look Like, Called when the presence of a roster entry is changed Name: esty Status: unavailable Called when the presence of a roster entry is changed Name: roni Status: unavailable So How to check who are online or offline. Another question is how to automatic accept the request. Please I need help. Here Is My code: public void

Retrieve Archive Delay on Openfire, how about Ejabberd?

守給你的承諾、 提交于 2020-01-25 05:27:05
问题 I am using Openfire server with Strophe and it has the Monitoring Plugin installed. It archives my messages, and I use strophe to load them. But there is a 30seconds-1min delay for the messages to be put into the database. I am wondering, if I use Ejabberd to archive messages, and the messages get put into the database, is there a delay as well? 回答1: There will be no delay on the ejabberd. As I was working on retrieving the messages using ejabberd, I didn't found any delay while retrieving

linux下部署openfire服务器

纵饮孤独 提交于 2020-01-22 01:18:08
openfire服务器的安装依赖于jdk以及数据库(mysql为例) 一、安装jdk 1、下载jdk安装包: wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" " http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz " 2、解压: tar zxvf jdk-8u141-linux-x64.tar.gz 3、修改环境变量: (1)进入修改的文件:vi /home/user/.bashrc (user为登录的用户,这里表示修改本用户的环境变量,若要修改全局则修改文件 /etc/profile) (2)添加如下内容: export JAVA_HOME=/home/user/tools/jdk1.8.0_141 (文件解压路径) export PATH=${JAVA_HOME}/bin:${PATH} (3)文件配置生效: source /home/user/.bashrc 4

27.app后端搭建聊天服务器的经历

丶灬走出姿态 提交于 2020-01-18 01:07:03
现在,聊天功能已经成了社交app的标配了。但是,众多web开发出生的程序员对聊天相关的服务的不了解,带来了很多开发上的困扰。在这篇文章中,根据下面3个方面,谈谈聊天服务。 1. 聊天服务的技术选型 2. 开发社交app中,实现聊天服务踩过的坑 3. 那些著名app的聊天服务 1. 聊天服务的技术选型 需要开发聊天服务,首先要选择用到的协议,现在,常用的聊天协议有: (1) xmpp,一个基于xml的消息协议,被广泛应用于Gtalk,Facebook,但缺点也很明显,由于基于xml,会产生大流量。 (2) mqtt,IBM开发的即时通讯协议,一个简单的消息协议,需要自己实现加好友,群聊等IM常见的功能 (3) 类ActivitySync,微信实现的协议,省流量,性能高,但由于是私有协议,IM的所有功能都需要自己实现。 Xmpp协议作为一个被广泛使用的消息协议,有大量的网络资料和成熟开源模块,例如在android和ios上,就很方便集成xmpp协议。IM作为一个复杂的系统,有方方面面需要考虑,使用成熟的协议,能帮助我们避免很多问题,提高了开发效率。 同时,xmpp协议的缺点也很明显,基于xml,造成了费流量。 不信,你瞧: <iq id="rosterset1" type="set"> <query xmlns="jabber:iq:roster"> <item jid="user

Keep the connection alive in openfire but show user as offline in xmpp

泄露秘密 提交于 2020-01-17 12:27:26
问题 I am developing an android chat application using openfire smack library.I have created a bound service to listen to messages when the is in background.The connection object is also maintained by service.Service is working fine as listening to background messages,but the problem is user is shown online all the time when the app is in background.Keeping the connection is also necessary so that user can listen to messages but this connection is showing user online all the time.I want to show

send notification using openfire xmpp server android using callbackonoffline

柔情痞子 提交于 2020-01-17 05:48:30
问题 I am currently developing chat application using openfire and smack library in android.I have installed openfire on my windows machine and also xampp server on it.I am able to do the android device to device chat using openfire,smack and xampp.I want to send notification when user is unavailable to chat.I found that that there is plugin available in openfire with name callbackonoffline.but i do not know how should i use it from my client android device to receive notification.I am doing using

SSL handshake hang

折月煮酒 提交于 2020-01-14 12:58:10
问题 I have seen this question around the forums but couldn't find any appropriate fix. Also all those questions are missing some info, so thought to put all what i have learned here. connecting the dots. I am working with SSL/TLS in openfire with 2 way authentication. Got a self signed wildcard certificate. which means i have my CA in both client and server. Now this works but sometimes, SSL handshake stucks at some particular line. Logs from server side: org.apache.mina.filter.ssl.SslFilter -

JPush集成方案

一个人想着一个人 提交于 2020-01-12 17:46:24
现在的移动应用中消息推送已经成为不可或缺的功能了,这样可以增加与用户的交互。 使用消息推送的方法有很多,原理大致是:移动端与消息服务器保持一个长连接,一旦服务器有消息就推给客户端,客户端收到消息做相应的处理。 消息推送 参考的实现方式: 1、XMPP协议实现的openfire可以作为消息服务器。客户端也有asmack封装好了xmpp协议。openfire提供了一套IM所需的所有功能,而且支持插件形式的二次开发。 2、开源项目androidpn,也是实现了XMPP协议。 3、JPush极光推送。等一系列第三方的推送平台。 各自的优缺点: 1、openfire提供了IM的所有功能,功能非常强大,但是移动端如果只想集成消息推送的话,openfire就显得很是笨重。而且openfire的二次开发资料很少,一般需针对公司的业务开发,使用公司自己的数据库。服务器端开发成本高,周期长。openfire的并发连接好像也只有5000左右(做的比较好的情况下,一般都达不到这个数)。移动客户端也要根据xmpp协议与openfire服务器进行交互来完成消息推送。所以客户端的开发周期也长。 2、androidpn也是实现的XMPP,但是只实现了核心的功能,也需要针对公司的业务进行二次开发。基本和openfire的缺点差不多。 3、JPush集成非常简单,客户端和服务端都不需要进行二次开发

How to send room configuration form and create persistence rooms from android using smack 4.3.4

旧时模样 提交于 2020-01-11 13:14:30
问题 I am facing problem for create persistence room and MUC, Not able to send room configuration form. Values i send that are not set to form fields and default values are send to server. 回答1: multiUserChatManager = MultiUserChatManager.getInstanceFor(connection); multiUserChat = multiUserChatManager.getMultiUserChat(JidCreate.entityBareFrom(roomJID)); multiUserChat.create(Resourcepart.from(nickname)); Form form = multiUserChat.getConfigurationForm(); Form submitForm = form.createAnswerForm();

How to get Java 32bit in Mac OS X Mavericks

好久不见. 提交于 2020-01-11 09:39:11
问题 I'm trying to set up an Openfire XMPP server on my MAC, however the problem is that I needed to upgrade to Maverick for Titanium and once you upgrade to Maverick Java updates to a 64bit rather than the 32bit that is needed for Openfire. How can I get the Java 32bit again? 回答1: This Should help you on understanding how to run a 32-Bit java environment with the -d32 switch. However, the most recent version of Openfire should be 64bit compatible, found here. 来源: https://stackoverflow.com