Skip to main content

CoreSDKParameters

Configuration parameters for a core SDK session.

Overview​

Pass a CoreSDKParameters to configure(). It names your site and where its panel config is served from, optionally narrowed to a page or to the events already playing. Only siteId and configBaseUrl are required.

Syntax​

data class CoreSDKParameters(
val siteId: String,
val configBaseUrl: String,
val pageConfigBaseUrl: String = configBaseUrl,
val whatJustHappenedBaseUrl: String = configBaseUrl,
val analyticsUrl: String? = null,
val pageId: String? = null,
val metadataValues: List<String> = emptyList(),
val appPackageVersion: String? = null,
val isProduction: Boolean = true,
val showHelloWorld: Boolean = false,
val costreamConfig: CostreamConfig? = null,
val userAgent: String = "ATV",
val pollingPauseAfterHidden: Duration = 10.minutes,
val configPollingMaxDuration: Duration = 2.hours,
)

Properties​

PropertyTypeDescription
siteIdStringYour Maestro site ID
configBaseUrlStringBase URL the panel config is served from
pageConfigBaseUrlStringBase URL for page config. Defaults to configBaseUrl.
whatJustHappenedBaseUrlStringBase URL for What Just Happened data. Defaults to configBaseUrl.
analyticsUrlString?Overrides the analytics endpoint. Defaults to null, the standard endpoint.
pageIdString?Narrows the config to one page. Defaults to null.
metadataValuesList<String>Identifiers of the events already playing at launch. Defaults to an empty list; update them later with onEventDataUpdated().
appPackageVersionString?Your app's version, reported with analytics. Defaults to null.
isProductionBooleanTrue for the production environment; false for development. Defaults to true.
showHelloWorldBooleanTrue to report the hello world panel as available, in panelAvailability and rendered:channels, when the page config enables no panels; false otherwise. MaestroCorePanel shows hello world in that case either way. Defaults to false.
costreamConfigCostreamConfig?Co-streaming setup (apiKey, eventId), an opt-in API marked @OptInModuleApi. Defaults to null.
userAgentStringThe user agent on the SDK's requests and analytics. Defaults to "ATV".
pollingPauseAfterHiddenDurationHow long the panel stays hidden before config polling pauses. Defaults to 10 minutes.
configPollingMaxDurationDurationThe longest config polling runs in one stretch; it starts again when the panel shows again or the events change. Defaults to 2 hours.

Example​

val params = CoreSDKParameters(
siteId = "your-site-id",
pageId = "your-page-id",
configBaseUrl = "https://static.gcp.maestro.io",
)