DelegatingSandboxedUiAdapter


@ExperimentalFeatures.DelegatingAdapterApi
class DelegatingSandboxedUiAdapter : SandboxedUiAdapter


A SandboxedUiAdapter that helps delegate calls to other uiAdapters.

When this adapter is set to the client's container, the adapter can switch the delegate uiAdapter, that serves the Session, without involving the client. For each new delegate, a session would be requested with all clients of this adapter.

One example use-case of these kind of UIAdapters is to support updating the provider of the UI without the client's involvement.

Summary

Nested types

This interface is deprecated. This library is no longer supported.

Public constructors

This function is deprecated. This library is no longer supported.

Public functions

Unit

This function is deprecated. This library is no longer supported.

Bundle

This function is deprecated. This library is no longer supported.

open Unit
openSession(
    context: Context,
    sessionData: SessionData,
    initialWidth: Int,
    initialHeight: Int,
    isZOrderOnTop: Boolean,
    clientExecutor: Executor,
    client: SandboxedUiAdapter.SessionClient
)

This function is deprecated. This library is no longer supported.

Unit

This function is deprecated. This library is no longer supported.

suspend Unit

This function is deprecated. This library is no longer supported.

Public constructors

DelegatingSandboxedUiAdapter

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
DelegatingSandboxedUiAdapter(delegate: Bundle)

Public functions

addDelegateChangeListener

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
fun addDelegateChangeListener(
    listener: DelegatingSandboxedUiAdapter.DelegateChangeListener
): Unit

getDelegate

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
fun getDelegate(): Bundle

Fetches the current delegate which is a SandboxedUiAdapter Bundle.

openSession

open fun openSession(
    context: Context,
    sessionData: SessionData,
    initialWidth: Int,
    initialHeight: Int,
    isZOrderOnTop: Boolean,
    clientExecutor: Executor,
    client: SandboxedUiAdapter.SessionClient
): Unit

Open a new session for displaying content with an initial size of initialWidthxinitialHeight pixels. client will receive all incoming communication from the provider of content. All incoming calls to client will be made through the provided clientExecutor. isZOrderOnTop tracks if the content surface will be placed on top of its window

removeDelegateChangeListener

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
fun removeDelegateChangeListener(
    listener: DelegatingSandboxedUiAdapter.DelegateChangeListener
): Unit

updateDelegate

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
suspend fun updateDelegate(delegate: Bundle): Unit

Updates the delegate and notifies all listeners to process the update. If any listener fails process refresh we throw IllegalStateException. Cancellation of this API does not propagate to the client side.