ActivityEmbeddingController


public final class ActivityEmbeddingController


The controller that allows checking the current Activity embedding status.

Summary

Public methods

final ActivityStack

Returns the ActivityStack that this activity is part of when it is being organized in the embedding container and associated with a SplitInfo.

static final @NonNull ActivityEmbeddingController

Obtains an instance of ActivityEmbeddingController.

final boolean

Checks if the activity is embedded and its presentation may be customized by the host process of the task this activity is associated with.

Public methods

getActivityStack

Added in 1.2.0
@ExperimentalWindowApi
public final ActivityStack getActivityStack(@NonNull Activity activity)

Returns the ActivityStack that this activity is part of when it is being organized in the embedding container and associated with a SplitInfo. Returns null if there is no such ActivityStack.

Parameters
@NonNull Activity activity

The Activity to check.

Returns
ActivityStack

the ActivityStack that this activity is part of, or null if there is no such ActivityStack.

getInstance

Added in 1.1.0
public static final @NonNull ActivityEmbeddingController getInstance(@NonNull Context context)

Obtains an instance of ActivityEmbeddingController.

Parameters
@NonNull Context context

the Context to initialize the controller with

isActivityEmbedded

Added in 1.1.0
public final boolean isActivityEmbedded(@NonNull Activity activity)

Checks if the activity is embedded and its presentation may be customized by the host process of the task this activity is associated with.

Parameters
@NonNull Activity activity

the Activity to check.