Problems with getChatManager ()

Hello!

I have some problems with this example:

XMPPConnection connection = new TCPConnection(“jabber.org”);

connection.connect();

connection.login(“mtucker”, “password”);

Chat chat = connection.getChatManager()

.createChat("jsmith@jivesoftware.com", new MessageListener() {

public void processMessage(Chat chat, Message message) {

    System.out.println("Received message: " + message);

}

});

chat.sendMessage(“Howdy!”);

I am using Android SDK - http://developer.android.com/sdk/index.html

I downloaded Smack, built it, connected as an external library, then copy this example. There is only one thing that does not want to work.

Chat chat = connection.getChatManager()

This method just as if not. I looked him in the library and did not find him anywhere to be able cast a to a particular object. I found his declaration not just assembled files: \ Smack-master \ core \ src \ test \ java \ org \ jivesoftware \ smack \ ChatConnectionTest.java

Therefore, the question is whether this method has already been collected in the library?

Sorry for my bad English. Thank you in advance.

Please always mention the version you are using.

I was taking library from here: https://github.com/Flowdalic/Smack

It turns out that the version 3.4.1.

I doubt that this is the source of the .jar you are using, as I don’t see one there. Could you mention the exact filename?

Yes, I was wrong, that the source code library - https://github.com/Flowdalic/aSmack, if anything, I have been collecting for 19 versions of android. Accordingly, the name of the resulting library - asmack-android-19.jar

I now simply assume that you build your own aSmack version with help of https://github.com/Flowdalic/aSmack. If so, then you need to replace

connection.getChatManager()

with

ChatManager.getInstanceFor(connection)