SdkActivityLaunchers

Added in 1.0.0-alpha01

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
)

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

static final @NonNull Bundle

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

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.

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.