Last active
August 7, 2020 21:39
-
-
Save AlexPrestonSB/bab1b35a87c0123adad3b826ec50f5c6 to your computer and use it in GitHub Desktop.
Sending a File 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
//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