getSearchForm returns null when using UserSearch in XMPP with aSmack

Update 04/2014 The original answer below contains now old and outdated information. Since aSmack 0.8 it’s no longer necessary to manually configure the provider manager. Calling SmackAndroid.init(Context) as the aSmack README tells you to do, takes care of all necessary initializations. Original Answer In the end, the problem was global to all asmack. It seems … Read more

XMPPFramework – Retrieve Archived Messages From Openfire Server

You have to do a request with <retrieve> (see http://xmpp.org/extensions/xep-0136.html) then you can take a specific time from the received <list> result. For example: Send: <iq type=”get” id=’pk1′> <list xmlns=”urn:xmpp:archive” with=”piyush@openfire”> <set xmlns=”http://jabber.org/protocol/rsm”> <max>30</max> </set> </list> </iq> Receive: <iq type=”result” id=”pk1″ to=”vivek@openfire/iphone”> <list xmlns=”urn:xmpp:archive”> <chat with=”piyush@openfire” start=”2012-07-04T13:16:12.291Z”/> <chat with=”piyush@openfire” start=”2012-07-05T08:25:31.555Z”/> <chat with=”piyush@openfire” start=”2012-07-05T12:38:24.098Z”/> <set xmlns=”http://jabber.org/protocol/rsm”> … Read more

Is there a WebSocket client implemented for Python? [closed]

http://pypi.python.org/pypi/websocket-client/ Ridiculously easy to use. sudo pip install websocket-client Sample client code: #!/usr/bin/python from websocket import create_connection ws = create_connection(“ws://localhost:8080/websocket”) print “Sending ‘Hello, World’…” ws.send(“Hello, World”) print “Sent” print “Receiving…” result = ws.recv() print “Received ‘%s'” % result ws.close() Sample server code: #!/usr/bin/python import websocket import thread import time def on_message(ws, message): print message def … Read more

Good XMPP Java Libraries for server side? [closed]

http://xmpp.org/xmpp-software/libraries/ has a list of software libraries for XMPP. Here is an outdated snapshot of it: ActionScript as3xmpp C iksemel libstrophe Loudmouth C++ gloox Iris oajabber C# / .NET / Mono agsXMPP SDK jabber-net Erlang Jabberlang Flash XIFF Haskell hsxmpp Java Echomine Feridian Jabber Stream Objects (JSO) Smack JavaScript strophe.js xmpp4js Lisp cl-xmpp Objective-C xmppframework … Read more

iphone XMPP App run background

You can indeed run a XMPP Framework-based app in the background in iOS4 by calling it a VoIP app. (However, Apple will reject it from the App Store unless it also truly does VoIP). You need to set the VoIP flag in your app’s (appname)-info.plist file, and then in (void)xmppStream:(XMPPStream *)sender socketWillConnect:(AsyncSocket *)socket You’ll need … Read more

Why does my wss:// (WebSockets over SSL/TLS) connection immediately disconnect without giving any errors?

After hours of debugging, I eventually found the problem; as I was messing around with the configuration of my XMPP server, I had re-generated the SSL certificates for the XMPPd. Since I was using self-signed certificates, this would cause an SSL error. Because I had visited that same URI over HTTPS before, I’d already manually … Read more

How to know Typing Status in XMPP openfire using Smack

To enable ChatStateListener you need to create a custom MessageListener Class public class MessageListenerImpl implements MessageListener,ChatStateListener { @Override public void processMessage(Chat arg0, Message arg1) { System.out.println(“Received message: ” + arg1); } @Override public void stateChanged(Chat arg0, ChatState arg1) { if (ChatState.composing.equals(arg1)) { Log.d(“Chat State”,arg0.getParticipant() + ” is typing..”); } else if (ChatState.gone.equals(arg1)) { Log.d(“Chat State”,arg0.getParticipant() … Read more

How to create XMPP chat client for facebook?

to get access token first you have to login fb.authorize(FacebookActivity.this, new String[] {“xmpp_login”},Facebook.FORCE_DIALOG_AUTH, new DialogListner()); SASLXFacebookPlatformMecha class import java.io.IOException; import java.net.URLEncoder; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Map; import org.apache.harmony.javax.security.auth.callback.CallbackHandler; import org.apache.harmony.javax.security.sasl.Sasl; import org.jivesoftware.smack.SASLAuthentication; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.sasl.SASLMechanism; import org.jivesoftware.smack.util.Base64; public class SASLXFacebookPlatformMecha extends SASLMechanism { private static final String NAME = “X-FACEBOOK-PLATFORM”; private String apiKey … Read more