Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

How to correctly disconnect from aSmack

$
0
0

I have running aSmack 8.4.0.0 on android. Connection is running in a service. I need to completely disconnect from aSmack and stop the service,

I am doing :

mConnection.removeConnectionListener(mConnectionListener);

mConnection.disconnect();

mSmackAndroid.onDestroy();

mConnection = null;

And setting to null all used Managers/listeners/receivers

But after starting the service again I have very strange situation.

aSmack is connected, reads the roster, and in debug mode I see that it receives messages from server, but not delivering it to app. And also when I try to sent a message I have  ConnectionException.

But when I completely kill the app, then aSmack is correctly connected to server.


Viewing all articles
Browse latest Browse all 4979

Trending Articles