OpenChannel

public final class OpenChannel extends BaseChannel

open channel.

similar chatroom large-scale public channel, Supports large amount user same When parameter and. user can self By Create, enter and Leave open channel.

*Note:

// Get open channel Object
val channel = OpenChannel.obtainChannel("open_123")

// Join open channel
val params = EnterOpenChannelParams(count = 10)
channel.enterChannel(params) { error ->
if (error == null) {
// Joined successfully
}
}

// Get channel Info
OpenChannel.getChannel("open_123") { channel, error ->
// ...
}

// Leave channel
channel.exitChannel { error ->
if (error == null) {
// Exited successfully
}
}

Types

Link copied to clipboard
public class Companion

Properties

Link copied to clipboard
public final static OpenChannel.Companion Companion
Link copied to clipboard
private Integer participantCount

When parameter before and person Count

Inherited properties

Link copied to clipboard
private final String channelId

Channel unique identifier

Link copied to clipboard

Channel message push notification level.

Link copied to clipboard
private final ChannelType channelType

Channel type

Link copied to clipboard
private final String draft

channel Draft content.

Link copied to clipboard

Message edit draft info.

Link copied to clipboard
private final Boolean includeRobot

Whether Contains machine people.

Link copied to clipboard
private final Boolean isPinned

channel Whether pinned.

Link copied to clipboard
private final Message latestMessage

channel the last messages. Contains the last messages complete Info (Content, Sender, When time etc.).

Link copied to clipboard
private final Integer mentionedCount

channel within @ message (Including @Everyone) Unread count.

Link copied to clipboard
private final Integer mentionedMeCount

channel within Only @ me message Unread count.

Link copied to clipboard
private final Long operationTime

channel Operation timestamp stamp (milli seconds).

Link copied to clipboard

Channel translation strategy.

Link copied to clipboard
private final Integer unreadCount

Unread message count amount.

Functions

Link copied to clipboard

Create open channel History message query Object. Uses Pagination mode, Via OpenChannelMessagesQuery.loadNextPage Paginated loading.

Link copied to clipboard
public final Unit deleteMetadata(DeleteMetadataParams params, ErrorHandler handler)
Link copied to clipboard
public final Unit enterChannel(EnterOpenChannelParams params, ErrorHandler handler)

Join open channel.

Link copied to clipboard
public final Unit exitChannel(ErrorHandler handler)

Leave open channel.

Link copied to clipboard
public final Unit getMetadata(String key, OperationHandler<Map<String, String>> handler)

Get open channel unit Data.

Link copied to clipboard
public final Integer getParticipantCount()

When parameter before and person Count

Link copied to clipboard
public final Unit setMetadata(OpenChannelMetadataParams params, ErrorHandler handler)
Link copied to clipboard
public final Unit setParticipantCount(Integer participantCount)

When parameter before and person Count

Inherited functions

Link copied to clipboard
public final Unit clearDraft(OperationHandler<Boolean> handler)

*Note: 1 seconds minute Send message Not can exceed 5 items.

Link copied to clipboard
public final Unit clearMessages(ClearMessagesParams params, ErrorHandler handler)

}

Link copied to clipboard
public Unit clearUnreadCount(OperationHandler<Boolean> handler)

println("first items Unread messages: ${message.messageId}")

Link copied to clipboard
public final Unit delete(OperationHandler<Boolean> handler)

Usage Example:

public final Unit delete(Boolean isDeleteRemote, ErrorHandler handler)

Notification settings

Link copied to clipboard

) { message, error ->

Link copied to clipboard
public final Unit deleteMessages(List<Message> messages, ErrorHandler handler)

Clear history messages.

Link copied to clipboard
public final Unit deleteMessagesForMe(List<Message> messages, ErrorHandler handler)

Usage Example:

Link copied to clipboard
public final Unit deleteTags(List<String> tagIds, ErrorHandler handler)

Usage Example:

Link copied to clipboard
public Boolean equals(Object other)
Link copied to clipboard
public final String getChannelId()

Channel unique identifier

Link copied to clipboard

Channel message push notification level.

Link copied to clipboard

if (error == null) {

Link copied to clipboard
public final ChannelType getChannelType()

Channel type

Link copied to clipboard
public final String getDraft()

channel Draft content.

Link copied to clipboard

Message edit draft info.

Link copied to clipboard

Usage Example:

Link copied to clipboard
public final Boolean getIncludeRobot()

Whether Contains machine people.

Link copied to clipboard
public final Message getLatestMessage()

channel the last messages. Contains the last messages complete Info (Content, Sender, When time etc.).

Link copied to clipboard
public final Integer getMentionedCount()

channel within @ message (Including @Everyone) Unread count.

Link copied to clipboard
public final Integer getMentionedMeCount()

channel within Only @ me message Unread count.

Link copied to clipboard
public final Unit getMessageReadReceiptInfo(List<String> messageIds, OperationHandler<List<ReadReceiptInfo>> handler)

From Local Data database re- New Get When before channel latest Info, Returns a New BaseChannel Object.

Link copied to clipboard

if (error == null && newChannel!= null) {

Link copied to clipboard
Link copied to clipboard
public final Long getOperationTime()

channel Operation timestamp stamp (milli seconds).

Link copied to clipboard
public final Unit getTags(OperationHandler<List<ChannelTagInfo>> handler)

channel.removeTags(listOf("tag001", "tag002")) { error ->

Link copied to clipboard
public final Unit getTextMessageDraft(OperationHandler<String> handler)

// Draft cleared successfully

Link copied to clipboard

Channel translation strategy.

Link copied to clipboard
public final Integer getUnreadCount()

Unread message count amount.

public Unit getUnreadCount(OperationHandler<Integer> handler)

// Cleared successfully

Link copied to clipboard

========================================

Link copied to clipboard
public Integer hashCode()
Link copied to clipboard
public final Boolean isPinned()

channel Whether pinned.

Link copied to clipboard

Delete message

Link copied to clipboard
public final Unit pin(PinParams params, OperationHandler<Boolean> handler)
Link copied to clipboard
public final Unit refreshReferenceMessage(List<String> messageIds, RefreshReferenceMessageHandler handler)

}

Link copied to clipboard
public final Unit reload(OperationHandler<BaseChannel> handler)

从底层重新加载频道数据。

Link copied to clipboard
public final Unit saveDraft(String draft, OperationHandler<Boolean> handler)

if (error == null) {

Link copied to clipboard

channel.sendMediaMessage(params, object: SendMediaMessageHandler {

Link copied to clipboard
public final Unit sendMessage(SendMessageParams params, SendMessageHandler handler)

channel.sendMessage(params, object: SendMessageHandler {

Link copied to clipboard
public final Unit sendReadReceiptResponse(List<String> messageIds, ErrorHandler handler)

========================================

Link copied to clipboard
Link copied to clipboard
public String toString()
Link copied to clipboard
public final Unit unpin(OperationHandler<Boolean> handler)

This Method Not Delete channel within message. If This channel has New message, This channel Convert re- New In List display,