Skip to main content

API Reference

Overview​

This API Reference covers the core SDK for an app that uses Maestro without a client SDK. You start a session with MaestroCoreSDK.configure(), get back a CoreMaestroSDK.Instance, and pass that session to the composables.

PackageTypes
com.maestro.uitoolkit.coreMaestroCoreSDK, MaestroCorePanel, MaestroCoreOverlays, MaestroCoreOverlayView, MaestroHelloWorldPanel, MaestroCoreTheme
com.maestro.uitoolkit.themeMaestroThemeData
com.lessthan3.maestropanel.shared.core.sdkCoreMaestroSDK, CoreSDKParameters, CoreEventDelegate, CoreDebugInterface
com.lessthan3.maestropanel.shared.core.statePanelAvailability, PanelEvent, RenderedChannels
com.lessthan3.maestropanel.shared.panelconfigPanelTypeId
com.lessthan3.maestropanel.shared.panelconfig.modelPanelData
com.lessthan3.maestropanel.shared.analyticsDeviceOrientation
com.lessthan3.maestropanel.shared.feature.wjhWjhModuleFact, WhatJustHappenedDisplay
com.lessthan3.maestropanel.shared.feature.costreamCostreamConfig
com.lessthan3.maestropanel.shared.feature.overlaysCoreOverlay, OverlayPosition

Core SDK​

MethodDescription
configure()Starts a new core SDK session

Session​

Members of the CoreMaestroSDK.Instance that configure() returns.

MemberDescription
onEventDataUpdated()Fetches the panel config for the current events
onPlayerTimecodeUpdated()Reports where the player's play-head is
didShowPanel()Marks the panel visible and selects a tab
didHidePanel()Marks the panel hidden
panelAvailabilityEmits whether the session has panels to show
selectedPanelEmits the panel type of the selected tab
selectPanelIfEnabled()Selects a tab if the page has it
setHostInput()Sets a named value a designed panel's fetch plan reads
overlaysEmits the current overlay, or null when there is none
dismissOverlay()Dismisses the current overlay
resetContext()Starts a new viewing context in the same session
detach()Ends the session
debugInterfaceQueues a test overlay

Other session members:

MemberDescription
selectedPanelData: StateFlow<PanelData?>The selected tab's panel, with its id, name, type and config id
enabledPanels: StateFlow<List<PanelData>>The panels the page config enables, in tab order
configPanelsUnsupported: StateFlow<Boolean?>true when the page config enables no panels, null while it loads
didShowPanel(panel: PanelData)Same as didShowPanel(), selecting the tab for a panel from enabledPanels
onOrientationChanged(orientation: DeviceOrientation)Reports the screen orientation (PORTRAIT, LANDSCAPE) for analytics
showWhatJustHappenedModule() / dismissWhatJustHappenedModule()Shows or dismisses the What Just Happened module. The core SDK has no What Just Happened view on Android yet.

Data Classes​

ClassDescription
CoreOverlayDescribes the overlay the session is currently showing
CoreSDKParametersConfiguration parameters for a core SDK session
OverlayPositionThe screen position of an overlay

Event Delegate​

InterfaceDescription
CoreEventDelegateCallbacks from the SDK to your app

UI​

ComposableDescription
MaestroCoreOverlayViewDraws the current overlay, for a host that places it itself
MaestroCoreOverlaysShows timecoded and broadcast overlays
MaestroCorePanelShows the panels the page config carries
MaestroHelloWorldPanelShows that the SDK is installed and running