androidx.a2ui.compose.runtime

Interfaces

A2uiComponentScope

The receiver scope provided to an A2UI component for rendering.

A2uiComponentState

Represents the state of an A2UI component instance.

A2uiReadinessEvaluator

Enables the UI layer to evaluate whether a resolved A2UI component is ready to be rendered, as defined by the component implementation (e.g., all its required dynamic data bindings have been resolved).

A2uiRuntimeCatalog

A marker interface representing a registry of A2UI components and functions that can be utilized by the Jetpack Compose A2UI runtime layer.

Classes

A2uiComponentModel

Represents a fully resolved and ready for rendering A2UI component.

A2uiComponentProperties

An immutable wrapper around the raw component property map supplied by the A2UI protocol.

A2uiComponentReference

Represents a pointer to an A2UI component with its optional data scope override.

A2uiComponentState.Error

Indicates that the component failed to resolve, evaluate, or render.

A2uiComponentState.Success

Indicates that the component successfully resolved its definition and properties, and is ready to be emitted into the composition tree.

A2uiProperty

A typed declaration of a property expected by an A2UI component.

ChildListA2uiProperty

A property representing a structural list of child components.

DynamicA2uiProperty

A property that supports dynamic data-binding and requires reactive evaluation.

StaticA2uiProperty

A static configuration or structural property that should be read synchronously.

Objects

A2uiComponentState.Loading

Indicates that the component's definition and properties are currently loading.

Composables

ProvideActionInterceptor

Intercepts actions dispatched by descendant components within content.

observeA2uiComponentState

Resolves the current A2uiComponentState of the root component for an A2UI surface and subscribes for future updates.

Top-level functions summary

A2uiMessageParser<String>

Creates an androidx.a2ui.model.processor.A2uiMessageParser configured to parse String-based JSON payloads into androidx.a2ui.model.protocol.A2uiServerToClientMessage objects.

A2uiMessageProcessor

Creates a A2uiMessageProcessor tailored for Jetpack Compose.

Top-level properties summary

Top-level functions

A2uiMessageParser

fun A2uiMessageParser(): A2uiMessageParser<String>

Creates an androidx.a2ui.model.processor.A2uiMessageParser configured to parse String-based JSON payloads into androidx.a2ui.model.protocol.A2uiServerToClientMessage objects.

Returns
A2uiMessageParser<String>

An A2uiMessageParser configured for the incoming JSON payloads.

a2uiRuntimeMessageProcessor

fun a2uiRuntimeMessageProcessor(
    catalogs: List<A2uiRuntimeCatalog>,
    interceptors: List<A2uiActionInterceptor> = emptyList()
): A2uiMessageProcessor

Creates a A2uiMessageProcessor tailored for Jetpack Compose.

This provisions the underlying core processor with a Compose-backed component registry and reactive data model that leverage the Compose Snapshot state.

Parameters
catalogs: List<A2uiRuntimeCatalog>

The list of A2uiRuntimeCatalogs defining the component schemas, local functions, and theme definitions supported by the client app. Each catalog provided must also implement the underlying androidx.a2ui.engine.catalog.A2uiCoreCatalog interface so that it can be ingested by the core data layer.

interceptors: List<A2uiActionInterceptor> = emptyList()

An optional list of A2uiActionInterceptor instances.

Returns
A2uiMessageProcessor

A fully initialized A2uiCoreMessageProcessor ready to process incoming messages.

Throws
IllegalArgumentException

If any catalog in the catalogs list does not implement the androidx.a2ui.engine.catalog.A2uiCoreCatalog interface.

Top-level properties