Docs
Use Cases
Producer Guide
SDK
Search…
v24
Introduction
Use Cases
When to choose Monterosa / Interaction Cloud™
Platform Components
Core Concepts
Experiences
User Management
Interaction SDK
TV & Big Screen Graphics
Scaling Capacity
FAQs
Creator User Guide
Getting Started
Studio Guide
Image or File Fields & Hosting
Localisation
Project Assets
Data Capture
Voting Certification
Curation
Twitter #Voting
User Roles
DEVELOPER GUIDES
What is an App?
Available APIs & Libraries
Creating an App in JavaScript
App Specs
TV & Big Screen Graphics
Working with Gamify
Browser Support
Advanced Topics
JavaScript lib
JavaScript Lib Overview
LViS
Listings
Event
Elements
Data Element
Regular Poll Element
Flexible Poll Element
Swing Poll Element
Emoting Poll Element
Prediction Element
Trivia Element
Powerbar Element
Curation Element
Connection Manager
Project
Date
Run
User
Storage
Sync
Migration Guide
Changelog
Android lib
Android Lib Overview
LViS
Project
Event
Elements Common API
Regular Poll Element
Swing Poll Element
Emoting Poll Element
Combi Poll Element
Powerbar Element
Trivia Element
Prediction Element
Data Element
Changelog
iOS lib
iOS Lib Overview
LViS
Project
Event
Elements Common API
Regular Poll Element
Swing Poll Element
Diametric Element
Emoting Poll Element
Combi Poll Element
Powerbar Element
Quiz Element
Trivia Element
Prediction Element
Data Element
Changelog
CONTROL API V2
Control API v2 Overview
Element Resource
Organisations
Brands
Apps
App Setup
Projects
Events
Event Templates
Elements
Objects definitions
PUBLIC FEEDS
Public Feeds
Listings
Elements
Event History
Demographics
LIMITS
Content
Vote Elements
Social Voting
Leaderboard
Extensions
Overview
Instance handshake
Project handshake
Project delete
Tabs
Event Tabs
Listings notification
Elements notification
Analytics
Assets
Event-level feed
Webhooks
COMPLIANCE
Data Requests
RELEASE NOTES
v23.0
V23.1
V23.2
Migration Guide
Powered By
GitBook
Trivia Element
Implements all
methods
of the parent class.
State
1
enum
State
{
2
Started
,
3
Stopped
,
4
Revealed
5
}
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 option user voted for.
1
int
[]
getUserVote
();
Copied!
Get correct option
Returns correct option index if vote has been revealed.
1
int
getCorrectOption
();
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 the element satisfies reveal mode.
1
boolean
hasResults
();
Copied!
Vote
Vote for specified option (zero-based numbering). Returns
true
on success.
1
boolean
vote
(
int
optionIndex
)
Copied!
Android lib - Previous
Powerbar Element
Next - Android lib
Prediction Element
Last modified
2yr ago
Copy link
Contents
State
Callback
Get question
Get options
Get results
Get user vote
Get correct option
Is validated user required
Has user voted
Has results
Vote