ActivityEmbeddingController

class ActivityEmbeddingController


The controller that allows checking the current Activity embedding status.

Summary

Public companion functions

ActivityEmbeddingController
getInstance(context: Context)

Obtains an instance of ActivityEmbeddingController.

Public functions

ActivityStack?

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

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 companion functions

getInstance

Added in 1.1.0
fun getInstance(context: Context): ActivityEmbeddingController

Obtains an instance of ActivityEmbeddingController.

Parameters
context: Context

the Context to initialize the controller with

Public functions

getActivityStack

Added in 1.2.0
@ExperimentalWindowApi
fun getActivityStack(activity: Activity): ActivityStack?

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
activity: Activity

The Activity to check.

Returns
ActivityStack?

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

isActivityEmbedded

Added in 1.1.0
fun isActivityEmbedded(activity: Activity): 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.

Parameters
activity: Activity

the Activity to check.