Package 

Class BaseChannel


  • 
    public abstract class BaseChannel
    
                        

    Objects representing a channel.

    • Method Detail

      • serialize

         Array<byte> serialize()

        Serializes the GroupChannel or OpenChannel instance. This byte array can be storedin the database in your application. The instance can be restored by buildFromSerializedData.

      • getCreatedAt

         long getCreatedAt()

        Returns channel creation time.

      • isFrozen

         boolean isFrozen()

        Checks if this channel is frozen.

      • isEphemeral

         boolean isEphemeral()

        Checks if this channel is ephemeral.

      • getMessagesByMessageId

         void getMessagesByMessageId(long messageId, MessageListParams params, BaseChannel.GetMessagesHandler handler)

        Retrieves previous or next messages based on the message ID in a specific channel.The result is passed to handler as list.

        Parameters:
        messageId - Specifies the message ID to be the reference point for messages to retrieve.
        params - Params for getting message list.
        handler - Callback handler.
      • getMessagesByTimestamp

         void getMessagesByTimestamp(long ts, MessageListParams params, BaseChannel.GetMessagesHandler handler)

        Retrieves previous or next messages based on the timestamp in a specific channel.The result is passed to handler as list.

        Parameters:
        ts - Specifies the timestamp to be the reference point for messages to retrieve, in Unix milliseconds format.
        params - Params for getting message list.
        handler - Callback handler.
      • getNextMessagesByTimestamp

        @Deprecated() void getNextMessagesByTimestamp(long ts, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getNextMessagesByTimestamp

        @Deprecated() void getNextMessagesByTimestamp(long ts, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getNextMessagesByTimestamp

        @Deprecated() void getNextMessagesByTimestamp(long ts, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getNextMessagesByTimestamp

        @Deprecated() void getNextMessagesByTimestamp(long ts, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getPreviousMessagesByTimestamp

        @Deprecated() void getPreviousMessagesByTimestamp(long ts, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getPreviousMessagesByTimestamp

        @Deprecated() void getPreviousMessagesByTimestamp(long ts, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getPreviousMessagesByTimestamp

        @Deprecated() void getPreviousMessagesByTimestamp(long ts, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getPreviousMessagesByTimestamp

        @Deprecated() void getPreviousMessagesByTimestamp(long ts, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        isInclusive - Whether messages sent exactly on the timestamp should be loaded.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getPreviousAndNextMessagesByTimestamp

        @Deprecated() void getPreviousAndNextMessagesByTimestamp(long ts, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the messages created before and after the given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getPreviousAndNextMessagesByTimestamp

        @Deprecated() void getPreviousAndNextMessagesByTimestamp(long ts, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the messages created before and after the given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getPreviousAndNextMessagesByTimestamp

        @Deprecated() void getPreviousAndNextMessagesByTimestamp(long ts, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the messages created before and after the given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getPreviousAndNextMessagesByTimestamp

        @Deprecated() void getPreviousAndNextMessagesByTimestamp(long ts, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the messages created before and after the given timestamp.The result is passed to handler as list.

        Parameters:
        ts - Starting message timestamp to load.
        prevResultSize - The number of messages sent to prior to the timestamp that should be loaded.
        nextResultSize - The number of messages sent after the timestamp that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getNextMessagesById

        @Deprecated() void getNextMessagesById(long msgId, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getNextMessagesById

        @Deprecated() void getNextMessagesById(long msgId, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getNextMessagesById

        @Deprecated() void getNextMessagesById(long msgId, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getNextMessagesById

        @Deprecated() void getNextMessagesById(long msgId, boolean isInclusive, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the next messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getPreviousMessagesById

        @Deprecated() void getPreviousMessagesById(long msgId, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getPreviousMessagesById

        @Deprecated() void getPreviousMessagesById(long msgId, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getPreviousMessagesById

        @Deprecated() void getPreviousMessagesById(long msgId, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getPreviousMessagesById

        @Deprecated() void getPreviousMessagesById(long msgId, boolean isInclusive, int prevResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the previous messages from given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        isInclusive - Whether the message exactly on the ID should be loaded.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getPreviousAndNextMessagesById

        @Deprecated() void getPreviousAndNextMessagesById(long msgId, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, BaseChannel.GetMessagesHandler handler)

        Requests the messages created earlier or later than the given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        handler - Callback handler.
      • getPreviousAndNextMessagesById

        @Deprecated() void getPreviousAndNextMessagesById(long msgId, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, BaseChannel.GetMessagesHandler handler)

        Requests the messages created earlier or later than the given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        handler - Callback handler.
      • getPreviousAndNextMessagesById

        @Deprecated() void getPreviousAndNextMessagesById(long msgId, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, BaseChannel.GetMessagesHandler handler)

        Requests the messages created earlier or later than the given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getPreviousAndNextMessagesById

        @Deprecated() void getPreviousAndNextMessagesById(long msgId, int prevResultSize, int nextResultSize, boolean reverse, BaseChannel.MessageTypeFilter messageType, String customType, List<String> senderUserIds, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessagesHandler handler)

        Requests the messages created earlier or later than the given ID.The result is passed to handler as list.

        Parameters:
        msgId - Starting message ID to load.
        prevResultSize - The number of messages sent to prior to the ID that should be loaded.
        nextResultSize - The number of messages sent after the ID that should be loaded.
        reverse - If true the result will be returned by creation time descending order.
        messageType - Returns messages whose type matches BaseChannel.MessageTypeFilter.
        customType - Returns messages that have a matching custom type.
        senderUserIds - Returns messages whose sender user id matches sender user ids.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getMessageChangeLogsByToken

        @Deprecated() void getMessageChangeLogsByToken(String token, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessageChangeLogsHandler handler)

        Requests message change logs after given timestamp.The result is passed to handler.

        Parameters:
        token - Token to get next message changelogs.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • getMessageChangeLogsByTimestamp

        @Deprecated() void getMessageChangeLogsByTimestamp(long ts, boolean includeMetaArray, BaseChannel.GetMessageChangeLogsHandler handler)

        Requests message change logs after given timestamp.The result is passed to handler.

        Parameters:
        ts - Timestamp to load change logs.
        includeMetaArray - If true the result will be returned with message meta array.
        handler - Callback handler.
      • getMessageChangeLogsByTimestamp

        @Deprecated() void getMessageChangeLogsByTimestamp(long ts, boolean includeMetaArray, boolean includeReactions, BaseChannel.GetMessageChangeLogsHandler handler)

        Requests message change logs after given timestamp.The result is passed to handler.

        Parameters:
        ts - Timestamp to load change logs.
        includeMetaArray - If true the result will be returned with message meta array.
        includeReactions - If true the result will be returned with message reactions.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(String fileUrl, String name, String type, int size, String data, BaseChannel.SendFileMessageHandler handler)

        Sends a file with given file information.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        fileUrl - URL of file to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(String fileUrl, String name, String type, int size, String data, String customType, BaseChannel.SendFileMessageHandler handler)

        Sends a file with given file information.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        fileUrl - URL of file to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        customType - Custom type.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(File file, String name, String type, int size, String data, BaseChannel.SendFileMessageHandler handler)

        Sends a file with given file information.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        handler - Callback handler.
      • sendFileMessage

        @Deprecated() FileMessage sendFileMessage(File file, String name, String type, int size, String data, String customType, BaseChannel.SendFileMessageHandler handler)

        Sends a file with given file information.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        customType - Custom type.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(File file, String name, String type, int size, String data, String customType, List<FileMessage.ThumbnailSize> thumbnailSizes, BaseChannel.SendFileMessageHandler handler)

        Sends a file with given file information.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        customType - Custom type.
        thumbnailSizes - Thumbnail sizes to be generated.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(File file, String name, String type, int size, String data, BaseChannel.SendFileMessageWithProgressHandler handler)

        Sends a file with given file information and gets callback for uploading progress.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        handler - Callback handler.
      • sendFileMessage

        @Deprecated() FileMessage sendFileMessage(File file, String name, String type, int size, String data, String customType, BaseChannel.SendFileMessageWithProgressHandler handler)

        Sends a file with given file information and gets callback for uploading progress.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        customType - Custom type.
        handler - Callback handler.
      • sendFileMessage

         FileMessage sendFileMessage(File file, String name, String type, int size, String data, String customType, List<FileMessage.ThumbnailSize> thumbnailSizes, BaseChannel.SendFileMessageWithProgressHandler handler)

        Sends a file with given file information and gets callback for uploading progress.File size value will only be used when sending a file message with a url. When sending afile message with local file, Sendbird calculates the file size on your behalf and file sizevalue will be ignored.

        Parameters:
        file - File to be sent.
        name - File name.
        type - File type.
        size - File size.
        data - Custom field.
        customType - Custom type.
        thumbnailSizes - Thumbnail sizes to be generated.
        handler - Callback handler.
      • increaseMetaCounters

         void increaseMetaCounters(Map<String, Integer> metaCounterMap, BaseChannel.MetaCounterHandler handler)

        Increases meta counters. This increases atomically the keyed meta counter by the specified value.

        Parameters:
        metaCounterMap - Meta counter key-value map to increase by the specified value.
        handler - Callback handler.
      • decreaseMetaCounters

         void decreaseMetaCounters(Map<String, Integer> metaCounterMap, BaseChannel.MetaCounterHandler handler)

        Decreases meta counters. This decreases atomically the keyed meta counter by the specified value.

        Parameters:
        metaCounterMap - Meta counter key-value map to decrease by the specified value.
        handler - Callback handler.
      • updateUserMessage

         void updateUserMessage(long messageId, String body, String data, String customType, BaseChannel.UpdateUserMessageHandler handler)

        Updates a UserMessage that was previously sent in the channel.

        Parameters:
        messageId - The ID of the message.
        body - The new message body.
        data - The new Data associated with the message.
        customType - The new Custom Type associated with the message.
        handler - An UpdateUserMessageHandler to receive the callback from this method.
      • updateFileMessage

         void updateFileMessage(long messageId, String data, String customType, BaseChannel.UpdateFileMessageHandler handler)

        Updates a FileMessage that was previously sent in the channel.Note that the file itself cannot be changed; only the fields stored within the message can be modified.

        Parameters:
        messageId - The ID of the message.
        data - The new Data associated with the message.
        customType - The new Custom Type associated with the message.
        handler - An UpdateFileMessageHandler to receive the callback from this method.
      • cancelFileMessageUpload

         boolean cancelFileMessageUpload(String requestId)

        Cancels an ongoing FileMessage upload.

        Parameters:
        requestId - The requestId of the message to cancel.