v24
Regular 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 where each element is an option index you've voted for.
1
int[] getUserVote();
Copied!

Get qualifying hashtags

Returns array of qualifying hashtags.
1
String[] getQualifyingHashtags();
Copied!

Get min options per vote

Returns minimum number of options user should vote for.
1
int getMinOptionsPerVote();
Copied!

Get max options per vote

Returns maximum number of options user can vote for.
1
int getMaxOptionsPerVote();
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 specified option indexes (zero-based numbering). Returns true on success.
1
boolean vote(int[] optionIndexes)
Copied!
Last modified 2yr ago