When i initialize the Teamchat it works the first time. Any usage after that gives the following error. Email ID, User ID, AuthenticationCode, not set.

Follow

 

. initWithCompletionHandler() method should be called after successful login.

Use login() method to Login to Teamchat.

Teamchat.login(LoginActivity.this, new Teamchat.LoginCompletionHandler()

{

@Override

public void onLoginCompletion(boolean success, String message)

{

if (success)

{

 

//Call initWithCompletionHandler() method here.

}

else

{

text.setText(message);

}

}

});

 

 

Also make sure that you have initialized Teamchat Singleton Instance using initializeWithAppID() method and set Host URL using setHostURL() method.

These two methods should be called before logging in.

If you are not using login and are logging through the background using direct server call to users endpoint,

Try calling Teamchat.showRoomList(ChatActivity.this); when there is active session. Looks like the current implementation initializes the app every time.

in onCreate check for active session, if no active session is present, then only initialize, otherwise show the rooms directly.

if(Teamchat.hasActiveSession(ChatActivity.this)){

Teamchat.showRoomList(ChatActivity.this);

} else {

initTeamChat();

}

Have more questions? Submit a request

Comments

Powered by Zendesk