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

Retrieve a list of voters

Create a PollVoterListQuery instance to retrieve a list of voters matching the specifications set by PollVoterListQueryParams. After a list of voters is successfully retrieved, you can access the data of each voter from the result list through the votes parameter of the callback handler.

val params = PollVoterListQueryParams(pollId, pollOptionId, channel.channelType, channel.url, limit = 20)
SendbirdChat.createPollVoterListQuery(params).next { votes, e ->
    if (e != null) {
        // Handle error.
    }
    
    // The list of voters for a poll option has been successfully retrieved.
}

PollVoterListQueryParams

Parameter nameTypeDescription

pollId

long

Specifies the unique ID of a poll.

pollOptionId

long

Specifies the unique ID of a poll option.

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 100, inclusive. (Default: 20)