Skip to main content

MaestroSDKParameters

Overview

MaestroSDKParameters is a data class that represents the configuration parameters for initializing a Maestro SDK session. It encapsulates all the necessary information required to set up and configure the SDK, including the site identifier, environment settings, and optional metadata.

Syntax

data class MaestroSDKParameters(
val siteId: String,
val environment: WorkingEnvironment = WorkingEnvironment.PRODUCTION,
val metadata: MaestroSDKMetadata = MaestroSDKMetadata(),
val showHelloWorld: Boolean = false
)

Properties

PropertyTypeDefaultDescription
siteIdStringRequiredThe unique identifier for your Maestro site. This value is provided by Maestro and must match a valid site configuration.
environmentWorkingEnvironmentWorkingEnvironment.PRODUCTIONSpecifies the environment in which the SDK should operate. Used to switch between production and development/staging environments.
metadataMaestroSDKMetadataMaestroSDKMetadata()Optional metadata containing additional configuration information such as platform name and device identifiers for analytics purposes.
showHelloWorldBooleanfalseControls what is displayed when no panels are available for a stream. When false (default), empty space with a "No panels available" message is shown. When true, the Hello World panel is displayed instead.

Usage Example

// Basic configuration with required parameters only
val params = MaestroSDKParameters(
siteId = "your-site-id"
)

// Configuration with custom environment
val params = MaestroSDKParameters(
siteId = "your-site-id",
environment = WorkingEnvironment.STAGING
)

// Configuration with metadata
val params = MaestroSDKParameters(
siteId = "your-site-id",
environment = WorkingEnvironment.PRODUCTION,
metadata = MaestroSDKMetadata(
platformName = "AndroidTV",
devicePermanentId = "unique-device-id"
)
)

// Configuration with Hello World panel enabled
val params = MaestroSDKParameters(
siteId = "your-site-id",
showHelloWorld = true
)

// Use with configure method
val sdkInstance = MaestroSDK.configure(
context = applicationContext,
maestroEventDelegate = this,
params = params
)

See Also