configure
Starts a new core SDK session.
Overview
MaestroCoreSDK.configure() is the first method you call when integrating the core SDK. It sets up a session from
your parameters and reports to your delegate. Only one session runs at a time: configuring again detaches the previous
session, which should not be used anymore.
Syntax
fun configure(
context: Context,
params: CoreSDKParameters,
delegate: CoreEventDelegate,
): CoreMaestroSDK.Instance
Parameters
| Parameter | Type | Description |
|---|---|---|
context | Context | Android context. The SDK keeps only its application context. |
params | CoreSDKParameters | Configuration parameters |
delegate | CoreEventDelegate | Receives callbacks from the SDK |
Returns
| Type | Description |
|---|---|
CoreMaestroSDK.Instance | The configured session. Pass it to MaestroCorePanel and MaestroCoreOverlays, and call the session methods listed in the API Reference on it. |
Example
val sdk = MaestroCoreSDK.configure(
context = applicationContext,
params = CoreSDKParameters(
siteId = "your-site-id",
pageId = "your-page-id",
configBaseUrl = "https://static.gcp.maestro.io",
),
delegate = MyCoreDelegate(),
)
Notes
- Call this method before any other SDK operation
- Only one session is active at a time; configuring again detaches the previous session
- Start sessions with
MaestroCoreSDK.configure()fromcom.maestro.uitoolkit.core.CoreMaestroSDK, the type of the session it returns, also has aconfigure(), which is internal to the SDK