Package-level declarations

Functions

Link copied to clipboard
suspend fun SendbirdChat.addFriends(userIds: List<String>): List<User>
fun SendbirdChat.addFriends(userIds: List<String>, handler: ResultHandler<List<User>>?)

Add friends.

Link copied to clipboard
suspend fun SendbirdChat.allowFriendDiscovery(allow: Boolean)

Sets friend discoverability of current user.

Link copied to clipboard
fun SendbirdChat.authenticate(userId: String, authToken: String? = null, apiHost: String? = null, handler: AuthenticationResultHandler?)

If you want to use the interface provided by the FeedChannel only, we'd recommend to authenticate using this function instead of SendbirdChat.awaitConnect.

Link copied to clipboard
suspend fun SendbirdChat.authenticateFeed(userId: String, authToken: String? = null, apiHost: String? = null): AuthUser
fun SendbirdChat.authenticateFeed(userId: String, authToken: String? = null, apiHost: String? = null, handler: AuthenticationResultHandler?)

If you want to use the interface provided by the FeedChannel only, we'd recommend to authenticate using this function instead of SendbirdChat.awaitConnect.

Link copied to clipboard
suspend fun SendbirdChat.awaitAddFriends(userIds: List<String>): List<User>

Add friends.

Link copied to clipboard
suspend fun SendbirdChat.awaitAllowFriendDiscovery(allow: Boolean)

Sets friend discoverability of current user.

Link copied to clipboard
suspend fun SendbirdChat.awaitAuthenticate(userId: String, authToken: String? = null, apiHost: String? = null): AuthUser

Authenticates to SendbirdChat with given User ID and auth token. This method is different from SendbirdChat.awaitConnect in that it doesn't create a websocket connection. This should be used in below cases: 1. If you want to use the interface provided by the FeedChannel only. 2. If you want to use chat interface prior to SendbirdChat.connect, i.e. SendbirdChat.getTotalUnreadMessageCount.

Link copied to clipboard
suspend fun SendbirdChat.awaitBlockUser(userIdToBlock: String): User

Blocks the specified User. Blocked User cannot send messages to the blocker.

Link copied to clipboard
suspend fun SendbirdChat.awaitClearCachedData(context: Context)

Clears the db data used in local caching. If local caching is enabled, this should be called before SendbirdChat.initFlow.

Link copied to clipboard
suspend fun SendbirdChat.awaitClearCachedMessages(channelUrl: String)

Clear cached messages of specific channel.

Link copied to clipboard
suspend fun SendbirdChat.awaitConnect(userId: String, authToken: String? = null, apiHost: String? = null, wsHost: String? = null): AuthUser

Connects to SendbirdChat with given User ID and auth token. If you have created Users without auth token, pass authToken with null.

Link copied to clipboard
suspend fun SendbirdChat.awaitDeleteFriend(userId: String)

Delete friend.

Link copied to clipboard
suspend fun SendbirdChat.awaitDeleteFriendDiscoveries(discoveryKeys: List<String>)

Delete friend discoveries.

Link copied to clipboard
suspend fun SendbirdChat.awaitDeleteFriendDiscovery(discoveryKey: String)

Delete friend discovery.

Link copied to clipboard
suspend fun SendbirdChat.awaitDeleteFriends(userIds: List<String>)

Delete friends.

Link copied to clipboard
suspend fun SendbirdChat.awaitDisconnect()

Disconnects from SendbirdChat.

Link copied to clipboard
suspend fun SendbirdChat.awaitDisconnectWebSocket()

Disconnects the websocket connection only. This does not clear the currentUser and any cached data. If you want to logout, call awaitDisconnect.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetAllEmoji(): EmojiContainer

Requests the all emoji. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetAllowFriendDiscovery(): Boolean

Gets friend discoverability of current user.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetChannelInvitationPreference(): Boolean

Gets the current User's preference for GroupChannel join. If this is set as true, the User will automatically join the GroupChannel. If set as false, the User can join the GroupChannel by calling GroupChannel.acceptInvitation or decline the invitation by calling GroupChannel.declineInvitation.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetDoNotDisturb(): DoNotDisturbResult
suspend fun SendbirdChat.HMS.awaitGetDoNotDisturb(): DoNotDisturbResult

Gets Do-not-disturb option for the current User.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetEmoji(key: String): Emoji

Requests the emoji. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetEmojiCategory(emojiCategoryId: Long): EmojiCategory

Requests the emoji category. The result is passed to handler.

Link copied to clipboard

Get friend changelogs by token.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetGlobalNotificationChannelSetting(): GlobalNotificationChannelSetting

Retrieves Global Notification channel theme.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetGroupChannelCount(myMemberStateFilter: MyMemberStateFilter?): Int

Gets the number of my GroupChannels.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMembersChangeLogsByToken(token: String): MembersChangeLogsResult

Requests the changelogs of members of group channels the current user is joined in.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMembersChangeLogsByTs(ts: Long): MembersChangeLogsResult

Requests the changelogs of members of group channels the current user is joined in.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMessageTemplate(templateKey: String): MessageTemplate

Retrieves a single message template by given template key.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMessageTemplatesByToken(token: String?, params: MessageTemplateListParams = MessageTemplateListParams()): MessageTemplatesResult

Retrieves Message template list by token

suspend fun SendbirdChat.awaitGetMyFeedChannelChangeLogsByTimestamp(ts: Long, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams()): FeedChannelChangeLogsResult

Requests the channel changelogs after given timestamp. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMyFeedChannelChangeLogsByToken(token: String?, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams()): FeedChannelChangeLogsResult

Requests the channel changelogs from given token. The result is passed to handler.

suspend fun SendbirdChat.awaitGetMyGroupChannelChangeLogsByTimestamp(ts: Long, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams()): GroupChannelChangeLogsResult

Requests the channel changelogs after given timestamp. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMyGroupChannelChangeLogsByToken(token: String?, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams()): GroupChannelChangeLogsResult

Requests the channel changelogs from given token. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetMyPushTokensByToken(token: String?, type: PushTokenType): MyPushTokensResult
suspend fun SendbirdChat.HMS.awaitGetMyPushTokensByToken(token: String, type: PushTokenType): MyPushTokensResult

Requests push tokens of current user from given token. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetNotificationTemplate(key: String): NotificationTemplate

Retrieves Notification template

Link copied to clipboard
suspend fun SendbirdChat.awaitGetNotificationTemplateListByToken(token: String?, params: NotificationTemplateListParams = NotificationTemplateListParams()): NotificationTemplateListResult

Retrieves Notification template list by token

Link copied to clipboard
suspend fun SendbirdChat.awaitGetPushSound(): String
suspend fun SendbirdChat.HMS.awaitGetPushSound(): String

Gets push notification sound path for the current User.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetPushTemplate(): String
suspend fun SendbirdChat.HMS.awaitGetPushTemplate(): String

Gets push template option for the current User. For details of push template option, refer to awaitSetPushTemplate. This can be used, for instance, when you need to check the push notification content preview is on or off at the moment.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetPushTriggerOption(): SendbirdChat.PushTriggerOption
suspend fun SendbirdChat.HMS.awaitGetPushTriggerOption(): SendbirdChat.PushTriggerOption

Gets the current User's push trigger option. Refer to PushTriggerOption. For details of push trigger option, refer to awaitSetPushTriggerOption.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetSnoozePeriod(): SnoozePeriodResult
suspend fun SendbirdChat.HMS.awaitGetSnoozePeriod(): SnoozePeriodResult

Gets snooze period for the current User.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetTotalScheduledMessageCount(params: TotalScheduledMessageCountParams): Int

Gets the number of total scheduled messages.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetTotalUnreadChannelCount(params: GroupChannelTotalUnreadChannelCountParams = GroupChannelTotalUnreadChannelCountParams()): Int

Gets the total number of unread GroupChannels the current user has joined.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetTotalUnreadMessageCount(params: GroupChannelTotalUnreadMessageCountParams = GroupChannelTotalUnreadMessageCountParams()): UnreadMessageCountResult

Gets the total number of unread message of GroupChannels with GroupChannelTotalUnreadMessageCountParams filter.

Link copied to clipboard
suspend fun SendbirdChat.awaitGetTotalUnreadNotificationCount(): Int

Gets the total number of unread notifications of FeedChannel

Link copied to clipboard
suspend fun SendbirdChat.awaitGetUIKitConfiguration(): UIKitConfiguration
Link copied to clipboard
suspend fun SendbirdChat.awaitGetUnreadItemCount(params: GroupChannelUnreadItemCountParams): Map<UnreadItemKey, Int>

Gets the unread item count of GroupChannels corresponding to GroupChannelUnreadItemCountParams.

suspend fun SendbirdChat.awaitGetUnreadItemCount(keys: Collection<UnreadItemKey>): Map<UnreadItemKey, Int>

Gets the unread item count of GroupChannels from keys.

Link copied to clipboard
suspend fun SendbirdChat.awaitMarkAsDelivered(data: Map<String, String>)

Sends mark as delivered to this channel when you received push message from us.

Link copied to clipboard
suspend fun SendbirdChat.awaitMarkAsRead(channelUrls: List<String>)

Sends mark as read to joined GroupChannels. This method has rate limit. You can send one request per second. It returns SendbirdException if you exceed the rate limit.

Link copied to clipboard
suspend fun SendbirdChat.awaitMarkAsReadAll()

Sends mark as read to all joined GroupChannels. This method has rate limit. You can send one request per second. It returns SendbirdException if you exceed the rate limit.

Link copied to clipboard
suspend fun SendbirdChat.awaitRegisterPushToken(gcmRegToken: String, unique: Boolean = false): PushTokenRegistrationStatus

Registers push token for the current User to receive push notification. To enable push notification and get a token, refer to Sendbird Docs.

Push token registration succeeds only when the connection (awaitConnect) is made. Otherwise, callback will return with PushTokenRegistrationStatus.PENDING status. Then you can register push token again by calling this method with pushToken which is provided by FCM as the token parameter, after the connection is done. This just adds token to the server. If you want to register this token and delete all the previous ones, refer to awaitRegisterPushToken.

suspend fun SendbirdChat.HMS.awaitRegisterPushToken(token: String, unique: Boolean = false): PushTokenRegistrationStatus

Registers push token for the current User to receive push notification. To enable push notification and get a token, refer to Sendbird Docs.

Push token registration succeeds only when the connection (awaitConnect) is made. Otherwise, callback will return with PushTokenRegistrationStatus.PENDING status. Then you can register push token again by calling this method with pushToken which is provided by HMS as the token parameter, after the connection is done.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetChannelInvitationPreference(autoAccept: Boolean)

Sets the current User's preference for GroupChannel join. If this is set as true, the User will automatically join the GroupChannel. If set as false, the User can join the GroupChannel by calling GroupChannel.acceptInvitation or decline the invitation by calling GroupChannel.declineInvitation.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetDoNotDisturb(doNotDisturbOn: Boolean, startHour: Int, startMin: Int, endHour: Int, endMin: Int, timezone: String)

Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use awaitSetSnoozePeriod.

suspend fun SendbirdChat.HMS.awaitSetDoNotDisturb(doNotDisturbOn: Boolean, startHour: Int, startMin: Int, endHour: Int, endMin: Int, timezone: String)

Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use SendbirdChat.HMS.awaitSetSnoozePeriod.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetPushSound(sound: String)
suspend fun SendbirdChat.HMS.awaitSetPushSound(sound: String)

Sets the push notification sound file path for the current User. This setting will be delivered on push notification payload.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetPushTemplate(templateName: String)

Sets push template option for the current User. The only valid arguments for template name are PUSH_TEMPLATE_DEFAULT and PUSH_TEMPLATE_ALTERNATIVE. If PUSH_TEMPLATE_DEFAULT is set, the push notification will contain the original message in the message field of the push notification. If PUSH_TEMPLATE_ALTERNATIVE is set, message of push notification will be replaced by the content you've set on SendbirdChat Dashboard.

suspend fun SendbirdChat.HMS.awaitSetPushTemplate(templateName: String)

Sets push template option for the current User. The only valid arguments for template name are PUSH_TEMPLATE_DEFAULT and PUSH_TEMPLATE_ALTERNATIVE. If PUSH_TEMPLATE_DEFAULT is set, the push notification will contain the original message in the message field of the push notification. If PUSH_TEMPLATE_ALTERNATIVE is set, message of push notification will be replaced by the content you've set on Sendbird Dashboard.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetPushTriggerOption(pushTriggerOption: SendbirdChat.PushTriggerOption)
suspend fun SendbirdChat.HMS.awaitSetPushTriggerOption(pushTriggerOption: SendbirdChat.PushTriggerOption)

Sets the current User's push trigger option. If certain channel's push trigger option is set to GroupChannel.PushTriggerOption.DEFAULT, it works according to the state of PushTriggerOption. If not, push messages will be triggered according to the state of GroupChannel.PushTriggerOption. Refer to GroupChannel.PushTriggerOption.

Link copied to clipboard
suspend fun SendbirdChat.awaitSetSnoozePeriod(snoozeOn: Boolean, startTs: Long, endTs: Long)

Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use awaitSetDoNotDisturb.

suspend fun SendbirdChat.HMS.awaitSetSnoozePeriod(snoozeOn: Boolean, startTs: Long, endTs: Long)

Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use awaitSetSnoozePeriod.

Link copied to clipboard
suspend fun SendbirdChat.awaitUnblockUser(blockedUserId: String)

Unblocks the specified User. Unblocked User can send messages to the ex-blocker.

Link copied to clipboard
suspend fun SendbirdChat.awaitUnregisterPushToken(pushToken: String)
suspend fun SendbirdChat.HMS.awaitUnregisterPushToken(token: String)

Unregisters push token for the current User.

Link copied to clipboard
suspend fun SendbirdChat.awaitUnregisterPushTokenAll()
suspend fun SendbirdChat.HMS.awaitUnregisterPushTokenAll()

Unregisters all push token bound to the current User.

Link copied to clipboard
suspend fun SendbirdChat.awaitUpdateCurrentUserInfo(params: UserUpdateParams)

Updates current User's information.

suspend fun SendbirdChat.awaitUpdateCurrentUserInfo(preferredLanguages: List<String>)

Updates current User's preferred language.

Link copied to clipboard
suspend fun SendbirdChat.awaitUploadFriendDiscoveries(discoveryMap: Map<String, String>)

Upload friend discoveries. SendbirdChat.addUserEventHandler SendbirdChat.removeAllUserEventHandlers

Link copied to clipboard
suspend fun SendbirdChat.blockUser(userIdToBlock: String): User

Blocks the specified User. Blocked User cannot send messages to the blocker.

fun SendbirdChat.blockUser(userIdToBlock: String, handler: ResultHandler<User>?)

Blocks the specified User ID. Blocked User cannot send messages to the blocker.

Link copied to clipboard
suspend fun SendbirdChat.clearCachedData(context: Context)

Clears the db data used in local caching. If local caching is enabled, this should be called before SendbirdChat.initFlow.

Link copied to clipboard
suspend fun SendbirdChat.clearCachedMessages(channelUrl: String)

Clear cached messages of specific channel.

Link copied to clipboard
suspend fun SendbirdChat.connect(userId: String, authToken: String? = null, apiHost: String? = null, wsHost: String? = null): AuthUser
fun SendbirdChat.connect(userId: String, authToken: String? = null, apiHost: String? = null, wsHost: String? = null, handler: ConnectResultHandler?)

Connects to SendbirdChat with given User ID and auth token. If you have created Users without auth token, pass authToken with null.

Link copied to clipboard
suspend fun SendbirdChat.deleteFriend(userId: String)

Delete friend.

Link copied to clipboard
suspend fun SendbirdChat.deleteFriendDiscoveries(discoveryKeys: List<String>)

Delete friend discoveries.

Link copied to clipboard
suspend fun SendbirdChat.deleteFriendDiscovery(discoveryKey: String)

Delete friend discovery.

Link copied to clipboard
suspend fun SendbirdChat.deleteFriends(userIds: List<String>)

Delete friends.

Link copied to clipboard
suspend fun SendbirdChat.disconnect()

Disconnects from SendbirdChat.

Link copied to clipboard
suspend fun SendbirdChat.disconnectWebSocket()

Disconnects the websocket connection only. This does not clear the currentUser and any cached data. If you want to logout, call awaitDisconnect.

Link copied to clipboard
suspend fun SendbirdChat.getAllEmoji(): EmojiContainer
fun SendbirdChat.getAllEmoji(handler: ResultHandler<EmojiContainer>?)

Requests the all emoji. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getAllowFriendDiscovery(): Boolean
fun SendbirdChat.getAllowFriendDiscovery(handler: ResultHandler<Boolean>?)

Gets friend discoverability of current user.

Link copied to clipboard
suspend fun SendbirdChat.getChannelInvitationPreference(): Boolean

Gets the current User's preference for GroupChannel join. If this is set as true, the User will automatically join the GroupChannel. If set as false, the User can join the GroupChannel by calling GroupChannel.acceptInvitation or decline the invitation by calling GroupChannel.declineInvitation.

Link copied to clipboard
suspend fun SendbirdChat.getDoNotDisturb(): DoNotDisturbResult
suspend fun SendbirdChat.HMS.getDoNotDisturb(): DoNotDisturbResult
fun SendbirdChat.getDoNotDisturb(handler: ResultHandler<DoNotDisturbResult>?)
fun SendbirdChat.HMS.getDoNotDisturb(handler: ResultHandler<DoNotDisturbResult>?)

Gets Do-not-disturb option for the current User.

Link copied to clipboard
suspend fun SendbirdChat.getEmoji(key: String): Emoji
fun SendbirdChat.getEmoji(key: String, handler: ResultHandler<Emoji>?)

Requests the emoji. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getEmojiCategory(emojiCategoryId: Long): EmojiCategory
fun SendbirdChat.getEmojiCategory(emojiCategoryId: Long, handler: ResultHandler<EmojiCategory>?)

Requests the emoji category. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getFriendChangeLogsByToken(token: String?): FriendChangeLogsResult

Get friend changelogs by token.

Link copied to clipboard
suspend fun SendbirdChat.getGlobalNotificationChannelSetting(): GlobalNotificationChannelSetting
fun SendbirdChat.getGlobalNotificationChannelSetting(handler: ResultHandler<GlobalNotificationChannelSetting>?)

Retrieves Global Notification channel theme.

Link copied to clipboard
suspend fun SendbirdChat.getGroupChannelCount(myMemberStateFilter: MyMemberStateFilter?): Int
fun SendbirdChat.getGroupChannelCount(myMemberStateFilter: MyMemberStateFilter?, handler: ResultHandler<Int>?)

Gets the number of my GroupChannels.

Link copied to clipboard
suspend fun SendbirdChat.getMembersChangeLogsByToken(token: String): MembersChangeLogsResult
fun SendbirdChat.getMembersChangeLogsByToken(token: String, handler: ResultHandler<MembersChangeLogsResult>?)

Requests the changelogs of members of group channels the current user is joined in.

Link copied to clipboard
suspend fun SendbirdChat.getMembersChangeLogsByTs(ts: Long): MembersChangeLogsResult
fun SendbirdChat.getMembersChangeLogsByTs(ts: Long, handler: ResultHandler<MembersChangeLogsResult>?)

Requests the changelogs of members of group channels the current user is joined in.

Link copied to clipboard
suspend fun SendbirdChat.getMessageTemplate(templateKey: String): MessageTemplate
fun SendbirdChat.getMessageTemplate(templateKey: String, handler: ResultHandler<MessageTemplate>?)

Retrieves a single message template by given template key.

Link copied to clipboard
suspend fun SendbirdChat.getMessageTemplatesByToken(token: String?, params: MessageTemplateListParams = MessageTemplateListParams()): MessageTemplatesResult
fun SendbirdChat.getMessageTemplatesByToken(token: String?, params: MessageTemplateListParams = MessageTemplateListParams(), handler: ResultHandler<MessageTemplatesResult>?)

Retrieves Message template list by token

Link copied to clipboard
suspend fun SendbirdChat.getMyFeedChannelChangeLogsByTimestamp(ts: Long, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams()): FeedChannelChangeLogsResult
fun SendbirdChat.getMyFeedChannelChangeLogsByTimestamp(ts: Long, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams(), handler: ResultHandler<FeedChannelChangeLogsResult>?)

Requests the channel changelogs after given timestamp. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getMyFeedChannelChangeLogsByToken(token: String?, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams()): FeedChannelChangeLogsResult
fun SendbirdChat.getMyFeedChannelChangeLogsByToken(token: String?, params: FeedChannelChangeLogsParams = FeedChannelChangeLogsParams(), handler: ResultHandler<FeedChannelChangeLogsResult>?)

Requests the channel changelogs from given token. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getMyGroupChannelChangeLogsByTimestamp(ts: Long, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams()): GroupChannelChangeLogsResult
fun SendbirdChat.getMyGroupChannelChangeLogsByTimestamp(ts: Long, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams(), handler: ResultHandler<GroupChannelChangeLogsResult>?)

Requests the channel changelogs after given timestamp. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getMyGroupChannelChangeLogsByToken(token: String?, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams()): GroupChannelChangeLogsResult
fun SendbirdChat.getMyGroupChannelChangeLogsByToken(token: String?, params: GroupChannelChangeLogsParams = GroupChannelChangeLogsParams(), handler: ResultHandler<GroupChannelChangeLogsResult>?)

Requests the channel changelogs from given token. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getMyPushTokensByToken(token: String?, type: PushTokenType): MyPushTokensResult
suspend fun SendbirdChat.HMS.getMyPushTokensByToken(token: String, type: PushTokenType): MyPushTokensResult
fun SendbirdChat.getMyPushTokensByToken(token: String?, type: PushTokenType, handler: ResultHandler<MyPushTokensResult>?)
fun SendbirdChat.HMS.getMyPushTokensByToken(token: String, type: PushTokenType, handler: ResultHandler<MyPushTokensResult>?)

Requests push tokens of current user from given token. The result is passed to handler.

Link copied to clipboard
suspend fun SendbirdChat.getNotificationTemplate(key: String): NotificationTemplate
fun SendbirdChat.getNotificationTemplate(key: String, handler: ResultHandler<NotificationTemplate>?)

Retrieves Notification template

Link copied to clipboard
suspend fun SendbirdChat.getNotificationTemplateListByToken(token: String?, params: NotificationTemplateListParams = NotificationTemplateListParams()): NotificationTemplateListResult
fun SendbirdChat.getNotificationTemplateListByToken(token: String?, params: NotificationTemplateListParams = NotificationTemplateListParams(), handler: ResultHandler<NotificationTemplateListResult>?)

Retrieves Notification template list by token

Link copied to clipboard
suspend fun SendbirdChat.getPushSound(): String
suspend fun SendbirdChat.HMS.getPushSound(): String
fun SendbirdChat.getPushSound(handler: ResultHandler<String>?)
fun SendbirdChat.HMS.getPushSound(handler: ResultHandler<String>?)

Gets push notification sound path for the current User.

Link copied to clipboard
suspend fun SendbirdChat.getPushTemplate(): String
suspend fun SendbirdChat.HMS.getPushTemplate(): String
fun SendbirdChat.getPushTemplate(handler: ResultHandler<String>?)
fun SendbirdChat.HMS.getPushTemplate(handler: ResultHandler<String>?)

Gets push template option for the current User. For details of push template option, refer to awaitSetPushTemplate. This can be used, for instance, when you need to check the push notification content preview is on or off at the moment.

Link copied to clipboard
suspend fun SendbirdChat.getPushTriggerOption(): SendbirdChat.PushTriggerOption
suspend fun SendbirdChat.HMS.getPushTriggerOption(): SendbirdChat.PushTriggerOption
fun SendbirdChat.getPushTriggerOption(handler: ResultHandler<SendbirdChat.PushTriggerOption>?)
fun SendbirdChat.HMS.getPushTriggerOption(handler: ResultHandler<SendbirdChat.PushTriggerOption>?)

Gets the current User's push trigger option. Refer to PushTriggerOption. For details of push trigger option, refer to awaitSetPushTriggerOption.

Link copied to clipboard
suspend fun SendbirdChat.getSnoozePeriod(): SnoozePeriodResult
suspend fun SendbirdChat.HMS.getSnoozePeriod(): SnoozePeriodResult
fun SendbirdChat.getSnoozePeriod(handler: ResultHandler<SnoozePeriodResult>?)
fun SendbirdChat.HMS.getSnoozePeriod(handler: ResultHandler<SnoozePeriodResult>?)

Gets snooze period for the current User.

Link copied to clipboard
suspend fun SendbirdChat.getTotalScheduledMessageCount(params: TotalScheduledMessageCountParams): Int
fun SendbirdChat.getTotalScheduledMessageCount(params: TotalScheduledMessageCountParams, handler: ResultHandler<Int>?)

Gets the number of total scheduled messages.

Link copied to clipboard
suspend fun SendbirdChat.getTotalUnreadChannelCount(params: GroupChannelTotalUnreadChannelCountParams = GroupChannelTotalUnreadChannelCountParams()): Int
fun SendbirdChat.getTotalUnreadChannelCount(params: GroupChannelTotalUnreadChannelCountParams = GroupChannelTotalUnreadChannelCountParams(), handler: ResultHandler<Int>?)

Gets the total number of unread GroupChannels the current user has joined.

Link copied to clipboard
suspend fun SendbirdChat.getTotalUnreadMessageCount(params: GroupChannelTotalUnreadMessageCountParams = GroupChannelTotalUnreadMessageCountParams()): UnreadMessageCountResult
fun SendbirdChat.getTotalUnreadMessageCount(params: GroupChannelTotalUnreadMessageCountParams = GroupChannelTotalUnreadMessageCountParams(), handler: ResultHandler<UnreadMessageCountResult>?)

Gets the total number of unread message of GroupChannels with GroupChannelTotalUnreadMessageCountParams filter.

Link copied to clipboard

Gets the total number of unread notifications of FeedChannel

Link copied to clipboard
suspend fun SendbirdChat.getUIKitConfiguration(): UIKitConfiguration
fun SendbirdChat.getUIKitConfiguration(handler: ResultHandler<UIKitConfiguration>?)
Link copied to clipboard
suspend fun SendbirdChat.getUnreadItemCount(keys: Collection<UnreadItemKey>): Map<UnreadItemKey, Int>
fun SendbirdChat.getUnreadItemCount(keys: Collection<UnreadItemKey>, handler: ResultHandler<Map<UnreadItemKey, Int>>?)

Gets the unread item count of GroupChannels from keys.

fun SendbirdChat.getUnreadItemCount(params: GroupChannelUnreadItemCountParams, handler: ResultHandler<Map<UnreadItemKey, Int>>?)

Gets the unread item count of GroupChannels corresponding to GroupChannelUnreadItemCountParams.

Link copied to clipboard
fun SendbirdChat.init(initParams: InitParams): Flow<InitResult>

Initializes SendbirdChat with given InitParams.

Link copied to clipboard
fun SendbirdChat.initFlow(initParams: InitParams): Flow<InitResult>

Initializes SendbirdChat with given InitParams.

Link copied to clipboard
suspend fun SendbirdChat.markAsDeliveredSuspend(data: Map<String, String>)

Sends mark as delivered to this channel when you received push message from us.

Link copied to clipboard
suspend fun SendbirdChat.markAsRead(channelUrls: List<String>)

Sends mark as read to joined GroupChannels. This method has rate limit. You can send one request per second. It returns SendbirdException if you exceed the rate limit.

Link copied to clipboard
suspend fun SendbirdChat.markAsReadAll()

Sends mark as read to all joined GroupChannels. This method has rate limit. You can send one request per second. It returns SendbirdException if you exceed the rate limit.

Link copied to clipboard
suspend fun SendbirdChat.registerPushToken(gcmRegToken: String, unique: Boolean = false): PushTokenRegistrationStatus

Registers push token for the current User to receive push notification. To enable push notification and get a token, refer to Sendbird Docs.

Push token registration succeeds only when the connection (awaitConnect) is made. Otherwise, callback will return with PushTokenRegistrationStatus.PENDING status. Then you can register push token again by calling this method with pushToken which is provided by FCM as the token parameter, after the connection is done. This just adds token to the server. If you want to register this token and delete all the previous ones, refer to awaitRegisterPushToken.

suspend fun SendbirdChat.HMS.registerPushToken(token: String, unique: Boolean = false): PushTokenRegistrationStatus
fun SendbirdChat.HMS.registerPushToken(token: String, unique: Boolean = false, handler: ResultHandler<PushTokenRegistrationStatus>?)

Registers push token for the current User to receive push notification. To enable push notification and get a token, refer to Sendbird Docs.

Push token registration succeeds only when the connection (awaitConnect) is made. Otherwise, callback will return with PushTokenRegistrationStatus.PENDING status. Then you can register push token again by calling this method with pushToken which is provided by HMS as the token parameter, after the connection is done.

fun SendbirdChat.registerPushToken(gcmRegToken: String, unique: Boolean = false, handler: ResultHandler<PushTokenRegistrationStatus>?)

Registers push token for the current User to receive push notification. To enable push notification and get a token, refer to Sendbird Docs.

Push token registration succeeds only when the connection (awaitConnect) is made. Otherwise, callback will return with PushTokenRegistrationStatus.PENDING status. Then, you can register push token again by calling awaitRegisterPushToken after the connection is done.

Link copied to clipboard
suspend fun SendbirdChat.setChannelInvitationPreference(autoAccept: Boolean)

Sets the current User's preference for GroupChannel join. If this is set as true, the User will automatically join the GroupChannel. If set as false, the User can join the GroupChannel by calling GroupChannel.acceptInvitation or decline the invitation by calling GroupChannel.declineInvitation.

Link copied to clipboard
suspend fun SendbirdChat.setDoNotDisturb(doNotDisturbOn: Boolean, startHour: Int, startMin: Int, endHour: Int, endMin: Int, timezone: String)

Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use awaitSetSnoozePeriod.

suspend fun SendbirdChat.HMS.setDoNotDisturb(doNotDisturbOn: Boolean, startHour: Int, startMin: Int, endHour: Int, endMin: Int, timezone: String)

Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use SendbirdChat.HMS.awaitSetSnoozePeriod.

Link copied to clipboard
suspend fun SendbirdChat.setPushSound(sound: String)
suspend fun SendbirdChat.HMS.setPushSound(sound: String)

Sets the push notification sound file path for the current User. This setting will be delivered on push notification payload.

Link copied to clipboard
suspend fun SendbirdChat.setPushTemplate(templateName: String)

Sets push template option for the current User. The only valid arguments for template name are PUSH_TEMPLATE_DEFAULT and PUSH_TEMPLATE_ALTERNATIVE. If PUSH_TEMPLATE_DEFAULT is set, the push notification will contain the original message in the message field of the push notification. If PUSH_TEMPLATE_ALTERNATIVE is set, message of push notification will be replaced by the content you've set on SendbirdChat Dashboard.

suspend fun SendbirdChat.HMS.setPushTemplate(templateName: String)

Sets push template option for the current User. The only valid arguments for template name are PUSH_TEMPLATE_DEFAULT and PUSH_TEMPLATE_ALTERNATIVE. If PUSH_TEMPLATE_DEFAULT is set, the push notification will contain the original message in the message field of the push notification. If PUSH_TEMPLATE_ALTERNATIVE is set, message of push notification will be replaced by the content you've set on Sendbird Dashboard.

Link copied to clipboard
suspend fun SendbirdChat.setPushTriggerOption(pushTriggerOption: SendbirdChat.PushTriggerOption)
suspend fun SendbirdChat.HMS.setPushTriggerOption(pushTriggerOption: SendbirdChat.PushTriggerOption)

Sets the current User's push trigger option. If certain channel's push trigger option is set to GroupChannel.PushTriggerOption.DEFAULT, it works according to the state of PushTriggerOption. If not, push messages will be triggered according to the state of GroupChannel.PushTriggerOption. Refer to GroupChannel.PushTriggerOption.

Link copied to clipboard
suspend fun SendbirdChat.setSnoozePeriod(snoozeOn: Boolean, startTs: Long, endTs: Long)

Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use awaitSetSnoozePeriod.

suspend fun SendbirdChat.HMS.setSnoozePeriod(snoozeOn: Boolean, startTs: Long, endTs: Long)

Sets snooze period for the current User. If this option is enabled, the current User does not receive push notification during the given period. It's not a repetitive operation. If you want to snooze repeatedly, use SendbirdChat.HMS.awaitSetSnoozePeriod.

Link copied to clipboard
suspend fun SendbirdChat.unblockUser(blockedUserId: String)

Unblocks the specified User. Unblocked User can send messages to the ex-blocker.

Link copied to clipboard
suspend fun SendbirdChat.unregisterPushToken(pushToken: String)
suspend fun SendbirdChat.HMS.unregisterPushToken(token: String)

Unregisters push token for the current User.

Link copied to clipboard
suspend fun SendbirdChat.unregisterPushTokenAll()
suspend fun SendbirdChat.HMS.unregisterPushTokenAll()

Unregisters all push token bound to the current User.

Link copied to clipboard
suspend fun SendbirdChat.updateCurrentUserInfo(params: UserUpdateParams)

Updates current User's information.

suspend fun SendbirdChat.updateCurrentUserInfo(preferredLanguages: List<String>)

Updates current User's preferred language.

Link copied to clipboard
suspend fun SendbirdChat.uploadFriendDiscoveries(discoveryMap: Map<String, String>)

Upload friend discoveries. SendbirdChat.addUserEventHandler SendbirdChat.removeAllUserEventHandlers