I am trying to make a small XMPP-capable chat application for a school project using aSmack-8-4-rc2 on Android 4.2.2, and I am having issues getting a ChatManager
object to process incoming messages.
Every example I have seen so far does
ChatManager manager = connection.getChatManager();
However, it seems that at some point during development, the function getChatManager()
was either removed or replaced from class XMPPConnection
(or XMPPTCPConnection
, since the former seems to have been deprecated), and I am unable to find ANY documentation or examples that give me any indication of what replacements I can get.
I tried using constructors from the class ChatManager
. It does appear to have a constructor, albeit a private one and I am therefore unable to create the object. I am assuming it is intended to be a singleton, but I have yet to find a way to get to it.
Does anybody know where was this function moved to?
Just found it. Leaving it here for future reference:
ChatManager chatManager = ChatManager.getInstanceFor(connection);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With