v24
Ask or search…
K
Links

Combi Poll Element

Implements all methods of the parent class.

State

enum State {
Started,
Stopped
}

Callback

interface Callback {
void onStateChanged(State state);
void onResults();
void onVote();
}

Get questions

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

Get options

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

Get results

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

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.
int[] getUserVote();

Is validated user required

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

Has user voted

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

Has results

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

Vote

Vote for option (zero-based numbering) of a question (zero-based numbering). Returns true on success.
boolean vote(int questionIndex, int optionIndex)