Creating a poll
To create a new poll, use the create method available on the meeting.polls object. The meeting.polls.create() function requires the following parameters:
| Param | Type | Required | Description |
|---|---|---|---|
| question | String | yes | The question that is to be voted for. |
| options | List<String> | yes | The options of the poll. |
| anonymous | Boolean | yes | If true, the poll votes are anonymous. |
| hideVotes | Boolean | yes | If true, the votes on the poll are hidden. |
The following snippet creates a poll where votes are anonymous.
val pollsCreateError: PollsError? = meeting.polls.create(
question = "Are you an early bird or a night owl?",
options = listOf("Early bird", "Night owl"),
anonymous = true,
hideVotes = false
)