ChatManager initialize

Hello everyone,

I successfully loggedin to my server with my username and password, now i’m trying to create a connection with chatmanager class and this class does not let meput XMPPTCP connection inside it it only takes XMPPConnection object.

You can say don’t use TCP connection but in that case the program doesn’t work and gives an error. I’m using asmack-8-4.0.6.jar and don’t know what to do now and i couldn’t find the documentation. The one on igniterealtime is not convinient with asmack.

My code is below. Thanks in advance.

XMPPTCPConnection connection = new XMPPTCPConnection(connConfig);

** try {**

** Log.d(“memo”, “trying to connect”);**

** connection.connect();**

** Log.d(“memo”, “connected to the server”);**

** connection.login(USERNAME, PASSWORD);**

** Log.d(“memo”, “successfully logged in”);**

** ChatManager chatManager = new ChatManager(connection);**


XMPPTCPConnection implements XMPPConnection, so this can not be issue.

Are you sure you did read the (compiler) error that’s shown and read ChatManager (smack 4.0.6 API) ?

Sorry for my late reply, i managed to solve it i was a complete beginner to android.

I’m now still working on my smack project and nice to see people in this community.

Thanks again