Skip to content

Instantly share code, notes, and snippets.

@AlexPrestonSB
Last active August 7, 2020 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexPrestonSB/bab1b35a87c0123adad3b826ec50f5c6 to your computer and use it in GitHub Desktop.
Save AlexPrestonSB/bab1b35a87c0123adad3b826ec50f5c6 to your computer and use it in GitHub Desktop.
Sending a File Message.
//File Message
// Sending a file message with a raw file
List<FileMessage.ThumbnailSize> thumbnailSizes = new ArrayList<>();
thumbnailSizes.add(new ThumbnailSize(100,100));
FileMessageParams params = new FileMessageParams()
.setFile(FILE)
.setFileName(FILE_NAME)
.setFileSize(FILE_SIZE)
.setMimeType(MIME_TYPE)
.setThumbnailSizes(thumbnailSizes)
.setCustomType(CUSTOM_TYPE)
.setData(DATA)
.setMetaArrayKeys(metaArrayKeys)
groupChannel.sendFileMessage(params, new BaseChannel.SendFileMessageHandler() {
@Override
public void onSent(FileMessage fileMessage, 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