/ SDKs / Android
SDKs
Chat SDKs Android v4
Chat SDKs Android
Chat SDKs
Android
Version 4

Retrieve a list of polls

Copy link

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

Copy link
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)