ASmack - where to get ChatManager?

I'm trying to create a small XMPP chat application for a school project using aSmack-8-4-rc2 on Android 4.2.2, and I'm having problems getting a ChatManager object to process incoming messages.

Every example I've seen so far

 ChatManager manager = connection.getChatManager(); 

However, it seems that at some point during development, the getChatManager() function was either removed or replaced from the XMPPConnection (or XMPPTCPConnection , since the former seems to be deprecated), and I cannot find ANY documentation or examples that give give me any indication of what kind of replacements I can get.

I tried using the constructors from the ChatManager class. It seems to have a constructor, albeit a private one, and therefore I cannot create an object. I guess it's intended for a single, but I still have to find a way to get to it.

Does anyone know where this function was moved?

+7
android asmack
source share
1 answer

Just found. Leaving it here for future reference:

 ChatManager chatManager = ChatManager.getInstanceFor(connection); 
+16
source share

All Articles