SdkActivityLauncher


public interface SdkActivityLauncher

Known direct subclasses
LocalSdkActivityLauncher

This interface is deprecated. Use the Privacy Sandbox Activity library version instead.


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

Apps can create launchers by calling createActivityLauncher 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 androidx.privacysandbox.ui.provider.SdkActivityLauncherFactory.createFromLauncherInfo.

Summary

Public methods

abstract boolean
launchSdkActivity(@NonNull IBinder sdkActivityHandlerToken)

Tries to launch a new SDK activity using the given sdkActivityHandlerToken, assumed to be registered in the SdkSandboxControllerCompat.

Extension functions

default final @NonNull Bundle

This method is deprecated. Use the Privacy Sandbox Activity library version instead.

Public methods

launchSdkActivity

abstract boolean launchSdkActivity(@NonNull IBinder sdkActivityHandlerToken)

Tries to launch a new SDK activity using the given sdkActivityHandlerToken, assumed to be registered in the SdkSandboxControllerCompat.

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

Extension functions

SdkActivityLaunchers.toLauncherInfo

default final @NonNull Bundle SdkActivityLaunchers.toLauncherInfo(
    @NonNull SdkActivityLauncher receiver
)

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