SdkActivityLaunchers

Added in 1.0.0-alpha10

public final class SdkActivityLaunchers


Summary

Public methods

static final @NonNull LocalSdkActivityLauncher<@NonNull T>
<T extends Activity & LifecycleOwner> createSdkActivityLauncher(
    @NonNull T receiver,
    @NonNull Function0<@NonNull Boolean> allowLaunch
)

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

static final @NonNull Bundle

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

Public methods

createSdkActivityLauncher

public static final @NonNull LocalSdkActivityLauncher<@NonNull T> <T extends Activity & LifecycleOwner> createSdkActivityLauncher(
    @NonNull T receiver,
    @NonNull Function0<@NonNull Boolean> allowLaunch
)

Returns an SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context.

Parameters
<T extends Activity & LifecycleOwner>

the current activity from which new SDK activities will be launched. If this activity is destroyed any further SDK activity launches will simply be ignored.

@NonNull Function0<@NonNull Boolean> allowLaunch

predicate called each time an activity is about to be launched by the SDK, the activity will only be launched if it returns true.

toLauncherInfo

public static final @NonNull Bundle toLauncherInfo(@NonNull SdkActivityLauncher receiver)

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