MindboxEmbeddedBlock
An embedded Mindbox block as a composable.
The caller names a place and gives the block an explicit height; the SDK decides what the place shows. The block takes the whole available width, and zero height when there is nothing to show. The behavior is that of MindboxEmbeddedBlockView. Keep the block in the composition rather than removing it in onEmpty: a collapsed block still shows content the place gets later.
MindboxEmbeddedBlock(
placeSystemName = "main-screen-top",
modifier = Modifier.height(120.dp),
)Parameters
The place the block fills. Whitespace around it is trimmed, letter case is ignored. A new name builds a new block.
How long the block waits for the SDK's answer before failing with MindboxEmbeddedBlockFailReason.NETWORK_ERROR. null takes the mindbox_embedded_block_timeout_ms integer resource, 30 s by default. Counted while the screen with the block is shown. Fixed when the block is created.
What the block shows until the SDK answers. MindboxEmbeddedBlockLoadingStrategy.AUTOMATIC by default. Fixed when the block is created.
Whether the content is revealed with an animation. true by default. Fixed when the block is created.
The content is shown. Main thread.
The place has nothing to show; the block collapsed. Main thread.
The block could not get or show its content; the block collapsed or shows error. The reason is one of the MindboxEmbeddedBlockFailReason constants. Main thread.
Replaces the SDK's shimmer while the content is loading. Fills the block.
Shown instead of collapsing the block when it fails. Failures only. Set it before the block fails: a slot set after the block has collapsed, for example in onFail, does not expand it. A block that waits hidden shows no error view. Fills the block.