addResponse
fun addResponse(forQuestion: HMSPollQuestion, options: List<HMSPollQuestionOption>, durationMillis: Long? = null): HMSPollResponseBuilder
Adds a response for a question with multiple selectable options.
Parameters
forQuestion
the question this answer is for.
options
all the options that are selected as the answer.
durationMillis
the milliseconds taken to answer. Only required for a timed question.
fun addResponse(forQuestion: HMSPollQuestion, option: HMSPollQuestionOption, durationMillis: Long? = null): HMSPollResponseBuilder
Adds a response for a question with a single selectable option from many.
Parameters
forQuestion
the question this answer is for.
option
the selected answer.
durationMillis
the milliseconds taken to answer. Only required for a timed question.
fun addResponse(forOpenQuestion: HMSPollQuestion, text: String, durationMillis: Long? = null): HMSPollResponseBuilder
Adds a response for an open-ended question.
Parameters
forOpenQuestion
the question this answer is for.
text
the answer.