Logging Out with the Android SDK

To stop receiving messages for a particular user and to cut off the connection with the server, be sure to log out of the Android SDK.

While the platform does a good job of cleaning up open resources, it is always good housekeeping to logout when the client does not want to show incoming messages.

TT.getInstance().getAccountManager().logout(new LogoutListener() {
@Override
public void onLoggedOut() {
// Handle logout
}
@Override
public void onLogoutError(Throwable throwable) {
// Handle logout Error
}
});

In the method onLoggedOut you have the chance to release all the resources linked to the user that was logged into the app.