Regular 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 question

Returns poll question.

Question getQuestion();

Get options

Returns poll options.

List<Option> getOptions();

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.

int[] getUserVote();

Get qualifying hashtags

Returns array of qualifying hashtags.

String[] getQualifyingHashtags();

Get min options per vote

Returns minimum number of options user should vote for.

int getMinOptionsPerVote();

Get max options per vote

Returns maximum number of options user can vote for.

int getMaxOptionsPerVote();

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 specified option indexes (zero-based numbering). Returns true on success.

boolean vote(int[] optionIndexes)