문제

I have been checking the SDK Manual (http://sdk.quickblox.com/android/) but I didn't figure out how to logout from chat.

I want to LogOut because API saves your pending messages when your are logged out.

Anyone has an idea about how to do that?

도움이 되었습니까?

해결책

Here is the shutdown(Presence unavailablePresence) method in XMPPConnection class

다른 팁

Here are the codes from Quickblox

boolean isLoggedIn = chatService.isLoggedIn();
if(!isLoggedIn){
    return;
}

chatService.logout(new QBEntityCallbackImpl() {

    @Override
    public void onSuccess() {
        // success

        chatService.destroy();
    }

    @Override
    public void onError(final List list) {

    }
});

hope this helps :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top