Created
June 4, 2019 19:16
-
-
Save AlexPrestonSB/e0fbaa73d36334a6aa15687b3d007cda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onResume() { | |
super.onResume(); | |
// Receives messages from SendBird servers | |
SendBird.addChannelHandler(CHANNEL_HANDLER_ID, new SendBird.ChannelHandler() { | |
@Override | |
public void onMessageReceived(BaseChannel baseChannel, BaseMessage baseMessage) { | |
if (baseChannel.getUrl().equals(mChannelUrl) && baseMessage instanceof UserMessage) { | |
mChatAdapter.appendMessage((UserMessage) baseMessage); | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment