v24
Combi Poll Element
Implements all methods of the parent class.

State

1
enum State {
2
Started,
3
Stopped
4
}
Copied!

Callback

1
interface Callback {
2
void onStateChanged(State state);
3
void onResults();
4
void onVote();
5
}
Copied!

Get questions

Returns poll questions.
1
List<Question> getQuestions();
Copied!

Get options

Returns poll options for all questions.
1
List<List<Option>> getOptions();
Copied!
Returns results for each source.

Get results

Returns JSON array of results.
1
JsonArray getResults();
Copied!
Returns results for each source.
1
JsonArray getResultsPerSource();
Copied!

Get user vote

Returns array where each element is an option index you've voted for. See Get results section to see how votes are stored.
1
int[] getUserVote();
Copied!

Is validated user required

Returns true if validated user required.
1
boolean isValidatedUserRequired();
Copied!

Has user voted

Returns true if user already voted.
1
boolean hasUserVoted();
Copied!

Has results

Returns true if results present and state of element satisfies reveal mode.
1
boolean hasResults();
Copied!

Vote

Vote for option (zero-based numbering) of a question (zero-based numbering). Returns true on success.
1
boolean vote(int questionIndex, int optionIndex)
Copied!
Last modified 2yr ago