Chat / Android
Chat Android v4
Chat Android
Chat
Android
Home
/
Chat
/
Android
/
Message
This is the new Docs for Chat SDK v4 for Android. To see the previous Docs, click here.

Retrieve the total number of scheduled messages

Use the getTotalScheduledMessageCount() method to retrieve the total number of scheduled messages a user has. The properties of TotalScheduledMessageCountParams are optional to set as a filter. If not set, the number of all scheduled messages that a user has will be retrieved.

// Retrieves the total number of scheduled messages.
val params = TotalScheduledMessageCountParams(
    channelUrl = null,
    scheduledStatus = null,
    messageTypeFilter = MessageTypeFilter.ALL
)
SendbirdChat.getTotalScheduledMessageCount(params) { count, e ->
    if (e != null) {
        // Handle error.
    }

    // `count` contains the number of scheduled messages.
}

TotalScheduledMessageCountParams

Parameter nameTypeDescription

channelUrl

string

Specifies the URL of the channel. (Default: null)

scheduledStatus

list

Specifies list of ScheduledStatus where scheduled messages with only given ScheduledStatus are retrieved. (Default: null)

messageTypeFilter

enum

Specifies the message type to filter the messages with the corresponding type. Acceptable values are ALL, USER, FILE, and ADMIN. (Default: ALL)