v24
Emoting 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 with single element that represents strength (1-5 - for first option, 6-10 - for second option)
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.
boolean hasResults();

Vote

Vote for specified option index (zero-based numbering) and strength (from 1 to 5). Returns true on success.
boolean vote(int optionIndex, int strength)
Copy link
On this page
State
Callback
Get question
Get options
Get results
Get user vote
Is validated user required
Has user voted
Has results
Vote