Skip to main content

SurveyQuestion

One question in a Survey.

Package: com.microblink.core

Declaration

class SurveyQuestion : Parcelable

Quick Reference​

Properties​

PropertyDescription
serverId()Server-assigned question identifier
text()Question text displayed to the user
type()Question type
answers()Available answer options
totalNumberOfQuestions()Total number of questions in the parent survey
myIndex()Zero-based position of this question
nextQuestionIndex()Server-supplied next question index
lastQuestion()Whether this is the final question
multipleAnswers()Whether the user may select multiple answers

Properties​

serverId()​

fun serverId(): Int

Server-assigned question identifier.


text()​

fun text(): String?

Question text displayed to the user.


type()​

fun type(): SurveyQuestionType?

Question type. SurveyQuestionType (com.microblink.core) values:

ValueMeaning
MULTIPLE_CHOICEThe user picks from answers(); see multipleAnswers()
OPEN_ENDEDThe user enters free-form text (SurveyResponse.freeText())

answers()​

fun answers(): List<SurveyAnswer>?

Available answer options. See SurveyAnswer.


totalNumberOfQuestions()​

fun totalNumberOfQuestions(): Int

Total number of questions in the parent survey.


myIndex()​

fun myIndex(): Int

Zero-based position of this question within the survey.


nextQuestionIndex()​

fun nextQuestionIndex(): Int

Next-question index supplied by the server for this question. SurveyClient does not use it: when the selected answer has no routing of its own (SurveyAnswer.nextQuestionIndex() is -1), it moves to the question after this one.


lastQuestion()​

fun lastQuestion(): Boolean

true if this is the final question in the survey.


multipleAnswers()​

fun multipleAnswers(): Boolean

true if the user may select more than one answer.