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
| Property | Type | Default | Description |
|---|---|---|---|
siteId | String | Required | The unique identifier for your Maestro site. This value is provided by Maestro and must match a valid site configuration. |
environment | WorkingEnvironment | WorkingEnvironment.PRODUCTION | Specifies the environment in which the SDK should operate. Used to switch between production and development/staging environments. |
metadata | MaestroSDKMetadata | MaestroSDKMetadata() | Optional metadata containing additional configuration information such as platform name and device identifiers for analytics purposes. |
showHelloWorld | Boolean | false | Controls 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
- configure - Method that uses MaestroSDKParameters to initialize the SDK
- MaestroSDKMetadata - Metadata class used within parameters
- WorkingEnvironment - Environment enumeration for SDK configuration