Chat / Android
Chat Android v4
Chat Android
Chat
Android
Version 4
Home
/
Chat
/
Android
/
Message

Retrieve a list of polls

Create a PollListQuery instance to retrieve a list of polls matching the specifications set by PollListQueryParams. After a list of polls is successfully retrieved, you can access the data of each polls from the result list through the polls parameter of the callback handler.

val params = PollListQueryParams(channel.channelType, channel.url, limit = 10)
SendbirdChat.createPollListQuery(params).next { polls, e ->
    if (e != null) {
        // Handle error.
    }

    // The list of polls has been successfully retrieved.
}

PollListQueryParams

Parameter nameTypeDescription

channelType

channelType

Specifies the type of the channel.

channelUrl

string

Specifies the URL of the channel.

limit

int

Specifies the number of results to retrieve per page. Acceptable values are 1 to 20, inclusive. (Default: 10)