Skip to content

Instantly share code, notes, and snippets.

@AlexPrestonSB
Last active August 7, 2020 21:41
Show Gist options
  • Save AlexPrestonSB/2db0e22f9ac8607bec9ff958eada832b to your computer and use it in GitHub Desktop.
Save AlexPrestonSB/2db0e22f9ac8607bec9ff958eada832b to your computer and use it in GitHub Desktop.
Getting messages from the server.
@Override
protected void onResume() {
super.onResume();
SendBird.addConnectionHandler(YOUR_CONNECTION_HANDLER_ID, new SendBird.ConnectionHandler() {
@Override
public void onReconnectStarted() {
SendBirdSyncManager.getInstance().pauseSync();
}
@Override
public void onReconnectSucceeded() {
SendBirdSyncManager.getInstance().resumeSync();
}
@Override
public void onReconnectFailed() {
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment