powered by Jive Software

getChatManager() is not found in smack-core-4.0.2.jar

Hi friends

I am creating chat client using “smack-core-4.0.2.jar”. My code is below that i am trying to open chat manager. To do that i have followed the below code(piece of code). But i am getting the error “The method getChatManager() is undefined for the type XMPPConnection” in line ‘chatManager = connection.getChatManager();’

Totally i am using “smack_4_0_2” bundle libs.

config = new ConnectionConfiguration(server, port);

// config.setSASLAuthenticationEnabled(false);


XMPPConnection connection = new XMPPTCPConnection(config);


System.out.println("Connected: " + connection.isConnected());

chatManager = connection.getChatManager();

messageListener = new MyMessageListener();

Please help me how to resolve that error.

Use ChatManager.getInstanceFor(connection)


Great it worked fine. Thank you so much