SharedUiAdapter


@ExperimentalFeatures.SharedUiPresentationApi
public 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

public interface SharedUiAdapter.Session extends AutoCloseable

A single session with the UI provider.

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

Public methods

abstract void
openSession(
    @NonNull Executor clientExecutor,
    @NonNull SharedUiAdapter.SessionClient client
)

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

Extension functions

default final @NonNull Bundle

Provides a Bundle containing a Binder which represents a SharedUiAdapter.

Public methods

openSession

Added in 1.0.0-alpha14
abstract void openSession(
    @NonNull Executor clientExecutor,
    @NonNull SharedUiAdapter.SessionClient client
)

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

SharedUiAdapterProxy.toCoreLibInfo

@ExperimentalFeatures.SharedUiPresentationApi
default final @NonNull Bundle SharedUiAdapterProxy.toCoreLibInfo(@NonNull SharedUiAdapter receiver)

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.