SharedUiAdapter


@ExperimentalFeatures.SharedUiPresentationApi
interface SharedUiAdapter


An adapter that provides a communication channel between a UI provider and a client app, while the client is displaying shared UI, i.e. UI that can contain both client-owned and provider-owned elements.

Summary

Nested types

A single session with the UI provider.

The client of a single session that will receive callback events from an active session.

Public functions

Unit
openSession(
    clientExecutor: Executor,
    client: SharedUiAdapter.SessionClient
)

Opens a new session to maintain connection with a UI provider.

Extension functions

Bundle

Provides a Bundle containing a Binder which represents a SharedUiAdapter.

Public functions

openSession

Added in 1.0.0-alpha14
fun openSession(
    clientExecutor: Executor,
    client: SharedUiAdapter.SessionClient
): Unit

Opens a new session to maintain connection with a UI provider. client will receive all incoming communication from the provider. All incoming calls to client will be made through the provided clientExecutor.

Extension functions

@ExperimentalFeatures.SharedUiPresentationApi
fun SharedUiAdapter.toCoreLibInfo(): Bundle

Provides a Bundle containing a Binder which represents a SharedUiAdapter. The Bundle is sent to the client in order for the SharedUiAdapter to be used to maintain a connection with a UI provider.