androidx.privacysandbox.activity.client


Interfaces

LocalSdkActivityLauncher

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

Classes

LocalManagedSdkActivityLauncher

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

LocalUnmanagedSdkActivityLauncher

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

Extension functions summary

LocalManagedSdkActivityLauncher<T>
<T : Activity & LifecycleOwner> T.createManagedSdkActivityLauncher(
    allowLaunch: () -> Boolean
)

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

LocalUnmanagedSdkActivityLauncher<T>
<T : Activity> T.createUnmanagedSdkActivityLauncher(
    allowLaunch: () -> Boolean
)

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

Bundle

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

Extension functions

createManagedSdkActivityLauncher

fun <T : Activity & LifecycleOwner> T.createManagedSdkActivityLauncher(
    allowLaunch: () -> Boolean
): LocalManagedSdkActivityLauncher<T>

Returns a lifecycle-aware SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context. The created launcher will be automatically disposed when the current activity is destroyed, with no additional work required.

Parameters
<T : Activity & LifecycleOwner>

the current LifecycleOwner activity from which new SDK activities will be launched. If this activity is destroyed, any further SDK activity launches will simply be ignored, and LocalManagedSdkActivityLauncher.launchSdkActivity will return 'false'.

allowLaunch: () -> Boolean

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

createUnmanagedSdkActivityLauncher

fun <T : Activity> T.createUnmanagedSdkActivityLauncher(
    allowLaunch: () -> Boolean
): LocalUnmanagedSdkActivityLauncher<T>

Returns a lifecycle-unaware SdkActivityLauncher that launches activities on behalf of an SDK by using this activity as a starting context. The created launcher will need to be manually disposed explicitly by the caller.

It is recommended to use a lifecycle-aware launcher created using createManagedSdkActivityLauncher instead. It is automatically disposed when the current activity is destroyed, making it less prone to memory leaks.

Parameters
<T : Activity>

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, and LocalUnmanagedSdkActivityLauncher.launchSdkActivity will return 'false'.

allowLaunch: () -> Boolean

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

fun SdkActivityLauncher.toLauncherInfo(): Bundle

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