interface SdkActivityLauncher

Known direct subclasses
LocalSdkActivityLauncher

Local version of SdkActivityLauncher that allows callers in the app process to dispose the launcher resources.

Known indirect subclasses
LocalManagedSdkActivityLauncher

Local implementation of a lifecycle-aware SDK Activity launcher.

LocalUnmanagedSdkActivityLauncher

Local implementation of an SDK Activity launcher.


Interface that allows SDKs running in the Privacy Sandbox to launch activities.

Apps can create launchers by calling createManagedSdkActivityLauncher or createUnmanagedSdkActivityLauncher from one of their activities.

To send an SdkActivityLauncher to another process, they can call toLauncherInfo and send the resulting bundle.

SDKs can create launchers from an app-provided bundle by calling fromLauncherInfo.

Summary

Public functions

suspend Boolean
launchSdkActivity(sdkActivityHandlerToken: IBinder)

Tries to launch a new SDK activity using the given sdkActivityHandlerToken.

Extension functions

Bundle

Returns a Bundle with the information necessary to recreate this launcher.

Public functions

launchSdkActivity

suspend fun launchSdkActivity(sdkActivityHandlerToken: IBinder): Boolean

Tries to launch a new SDK activity using the given sdkActivityHandlerToken.

Returns true if the SDK activity intent was sent, false if the launch was rejected for any reason.

A valid sdkActivityHandlerToken can be obtained by registering an SDK activity with registerSdkSandboxActivityHandler.

Extension functions

fun SdkActivityLauncher.toLauncherInfo(): Bundle

Returns a Bundle with the information necessary to recreate this launcher. Possibly in a different process.