Created
August 7, 2020 21:22
-
-
Save AlexPrestonSB/ee742be69ff7ead8a999dda1c00cdf2a to your computer and use it in GitHub Desktop.
Sending a User Message.
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
//User Message | |
List<String> translationTargetLanguages = new ArrayList<>(); | |
translationTargetLanguages.add("fr"); // French | |
translationTargetLanguages.add("de"); // German | |
UserMessageParams params = new UserMessageParams() | |
.setMessage(TEXT_MESSAGE) | |
.setCustomType(CUSTOM_TYPE) | |
.setData(DATA) | |
.setTranslationTargetLanguages(translationTargetLanguages) | |
groupChannel.sendUserMessage(params, new BaseChannel.SendUserMessageHandler() { | |
@Override | |
public void onSent(UserMessage userMessage, SendBirdException e) { | |
if (e != null) { // Error. | |
return; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment