v24
Emoting 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 question

Returns poll question.
1
Question getQuestion();
Copied!

Get options

Returns poll options.
1
List<Option> getOptions();
Copied!

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

Vote

Vote for specified option index (zero-based numbering) and strength (from 1 to 5). Returns true on success.
1
boolean vote(int optionIndex, int strength)
Copied!
Last modified 2yr ago