smack

File is not being transferred in smack API

别来无恙 提交于 2019-12-01 11:01:31
问题 I am developing a chat application in which i need to give support of file transfer. For this i am using Smack API. But my file is not being transferred and i am getting the File status Error and progress 0.0 i have googled on net but they all are used the same way to send the file. but i am getting the error. I know there is a couple of question regarding this issue but proper solution is not given. so is there anyone who have idea about this? How to solve this problem? Edit: I have try with

Android Smack MessageEventListener

旧时模样 提交于 2019-12-01 10:38:20
I´m trying to use XMPP´s message event interface. As far as I understand you can mark a message you send with a 'delivery notification requested' flag and the recipient is than responsible to send you this notification. Has anyone succeeded in implementing this? Can someone send me some sample code? My code doesn´t work. The callbacks of my listeners (MessageEventNotificationListener, MessageEventRequestListener) are never called: @Override public void onCreate( Bundle savedInstanceState ) { super.onCreate( savedInstanceState ); setContentView( R.layout.chat ); PacketFilter filter = new

How to properly listen for MultiUserChat in Smack?

孤街浪徒 提交于 2019-12-01 09:29:50
I'm not sure how to properly listen for MultiUserChats, since there are apparently two different ways to listen for them. The first way is to add a MessageListener for each room, like this: MultiUserChat muc = new MultiUserChat(connection,"MyGroup"); muc.addMessageListener(new PacketListener() { @Override public void processPacket(Packet packet) throws NotConnectedException { // TODO Auto-generated method stub } }); The second way is to listen as you would for normal single-chat messages: PacketFilter filter = new MessageTypeFilter(Message.Type.groupchat); connection.addPacketListener(new

When to disconnect bosh connection establish from app server to use prebinding in strophe?

旧巷老猫 提交于 2019-12-01 09:18:35
This question is Extension of my previous question on this SO question " How to connect XMPP bosh server using java smack library? " I am using Java as server side language. I have successfully implement xmpp BOSH connection using smach-jbosh thanks to @Deuteu for helping me to achieve this, so far I have modify jbosh's BOSHClient.java file and added two getter method for extracting RID and SID. Now I have RID and SID on my app server (I am using Apache Tomcat). I need to pass this credential to Strophe (web client) so that it can attach to connection. Here I have some doubt. When to

Openfire 的安装和配置

若如初见. 提交于 2019-12-01 08:29:56
http://www.cnblogs.com/hoojo/archive/2012/05/17/2506769.html Android XMPP 例子(Openfire+asmack+spark) http://www.eoeandroid.com/thread-153213-1-1.html #征文再续#Android基于XMPP Smack Openfire开发IM(一) http://www.apkbus.com/forum.php?mod=viewthread&tid=121247 移动开发:利用smack实现基于XMPP协议的简单通信demo http://www.xue5.com/Mobile/Mobile/653510.html 仿微信 聊天带表情发送 http://www.godcoder.com/home/page/2 来源: oschina 链接: https://my.oschina.net/u/1389206/blog/345357

Reconnection to xmpp server using smack

自闭症网瘾萝莉.ら 提交于 2019-12-01 08:26:40
问题 i am trying to develop a chat app, everything is working fine when internet is stable. like i can send and receive messages. but when the internet goes off for a while xmpp closes the connection. when internet comes back i am trying to reconnect to server. after successful reconnection i got the Stream error of Client already logged in and connection is automatically closed. Here is my Broadcast receiver code to check Internet connection. networkReceiver = new BroadcastReceiver (){ @Override

Android Smack MessageEventListener

久未见 提交于 2019-12-01 07:05:35
问题 I´m trying to use XMPP´s message event interface. As far as I understand you can mark a message you send with a 'delivery notification requested' flag and the recipient is than responsible to send you this notification. Has anyone succeeded in implementing this? Can someone send me some sample code? My code doesn´t work. The callbacks of my listeners (MessageEventNotificationListener, MessageEventRequestListener) are never called: @Override public void onCreate( Bundle savedInstanceState ) {

SASL Authentication failed while integrating facebook chat using Smack

删除回忆录丶 提交于 2019-12-01 06:48:46
I am trying to integrate facebook chat using smack API.But i get an error telling authentication failed using digest md5... Here s the code for authentication: SASLAuthentication.registerSASLMechanism("DIGEST-MD5", SASLDigestMD5Mechanism.class); SASLAuthentication.supportSASLMechanism("DIGEST-MD5", 0); ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com",5222); connection = new XMPPConnection(config); config.setSASLAuthenticationEnabled(true); connection.connect(); connection.login(userName, password); below is the error i get wen i run it: Exception in thread "main

How to connect XMPP bosh server using java smack library?

落花浮王杯 提交于 2019-12-01 06:42:04
I have working xmpp client on webapp using strophe.js ,as per my use case scenario i have to switch to different pages rapidly Current approach is not secure as jid and password is visible in java script ,I was finding work around to implement security in strophe client an trying to make connection time(with bosh) more shorter ,while going through the book "XMPP Programming with JavaScript and jQuery"by jake moffitt i came across one solution which element both of my above problems is to implement session mechanism.which says that we can use strophe attach(jid,sid,rid) to connect to existing

How to properly listen for MultiUserChat in Smack?

感情迁移 提交于 2019-12-01 06:06:47
问题 I'm not sure how to properly listen for MultiUserChats, since there are apparently two different ways to listen for them. The first way is to add a MessageListener for each room, like this: MultiUserChat muc = new MultiUserChat(connection,"MyGroup"); muc.addMessageListener(new PacketListener() { @Override public void processPacket(Packet packet) throws NotConnectedException { // TODO Auto-generated method stub } }); The second way is to listen as you would for normal single-chat messages: