ActivityInfo

public class ActivityInfo
extends ComponentInfo implements Parcelable

java.lang.Object
   ↳ android.content.pm.PackageItemInfo
     ↳ android.content.pm.ComponentInfo
       ↳ android.content.pm.ActivityInfo


Information you can retrieve about a particular application activity or receiver. This corresponds to information collected from the AndroidManifest.xml's <activity> and <receiver> tags.

Summary

Nested classes

class ActivityInfo.WindowLayout

Contains information about position and size of the activity on the display. 

Constants

int COLOR_MODE_DEFAULT

Value for colorMode indicating that the activity should use the default color mode (sRGB, low dynamic range).

int COLOR_MODE_HDR

Value of colorMode indicating that the activity should use a high dynamic range if the presentation display supports it.

int COLOR_MODE_WIDE_COLOR_GAMUT

Value of colorMode indicating that the activity should use a wide color gamut if the presentation display supports it.

int CONFIG_COLOR_MODE

Bit in configChanges that indicates that the activity can itself handle the change to the display color gamut or dynamic range.

int CONFIG_DENSITY

Bit in configChanges that indicates that the activity can itself handle density changes.

int CONFIG_FONT_SCALE

Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor.

int CONFIG_FONT_WEIGHT_ADJUSTMENT

Bit in configChanges that indicates that the activity can itself handle changes to font weight.

int CONFIG_GRAMMATICAL_GENDER

Bit in configChanges that indicates that the activity can itself handle the change to gender.

int CONFIG_KEYBOARD

Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type.

int CONFIG_KEYBOARD_HIDDEN

Bit in configChanges that indicates that the activity can itself handle changes to the keyboard or navigation being hidden/exposed.

int CONFIG_LAYOUT_DIRECTION

Bit in configChanges that indicates that the activity can itself handle the change to layout direction.

int CONFIG_LOCALE

Bit in configChanges that indicates that the activity can itself handle changes to the locale.

int CONFIG_MCC

Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MCC.

int CONFIG_MNC

Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MNC.

int CONFIG_NAVIGATION

Bit in configChanges that indicates that the activity can itself handle changes to the navigation type.

int CONFIG_ORIENTATION

Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation.

int CONFIG_SCREEN_LAYOUT

Bit in configChanges that indicates that the activity can itself handle changes to the screen layout.

int CONFIG_SCREEN_SIZE

Bit in configChanges that indicates that the activity can itself handle the screen size.

int CONFIG_SMALLEST_SCREEN_SIZE

Bit in configChanges that indicates that the activity can itself handle the smallest screen size.

int CONFIG_TOUCHSCREEN

Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type.

int CONFIG_UI_MODE

Bit in configChanges that indicates that the activity can itself handle the ui mode.

int DOCUMENT_LAUNCH_ALWAYS

Constant corresponding to always in the R.attr.documentLaunchMode attribute.

int DOCUMENT_LAUNCH_INTO_EXISTING

Constant corresponding to intoExisting in the R.attr.documentLaunchMode attribute.

int DOCUMENT_LAUNCH_NEVER

Constant corresponding to never in the R.attr.documentLaunchMode attribute.

int DOCUMENT_LAUNCH_NONE

Constant corresponding to none in the R.attr.documentLaunchMode attribute.

int FLAG_ALLOW_TASK_REPARENTING

Bit in flags that indicates that the activity can be moved between tasks based on its task affinity.

int FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING

Bit in flags: If set, indicates that the activity can be embedded by untrusted hosts.

int FLAG_ALWAYS_RETAIN_TASK_STATE

Bit in flags indicating that, when the activity is the root of a task, that task's stack should never be cleared when it is relaunched from home.

int FLAG_AUTO_REMOVE_FROM_RECENTS

Bit in flags indicating that tasks started with this activity are to be removed from the recent list of tasks when the last activity in the task is finished.

int FLAG_CLEAR_TASK_ON_LAUNCH

Bit in flags indicating that, when the activity is the root of a task, that task's stack should be cleared each time the user re-launches it from home.

int FLAG_ENABLE_VR_MODE

Bit in flags indicating that this activity should be run with VR mode enabled.

int FLAG_EXCLUDE_FROM_RECENTS

Bit in flags that indicates that the activity should not appear in the list of recently launched activities.

int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS

Bit in flags indicating that, when a request to close system windows happens, this activity is finished.

int FLAG_FINISH_ON_TASK_LAUNCH

Bit in flags indicating that, when the activity's task is relaunched from home, this activity should be finished.

int FLAG_HARDWARE_ACCELERATED

Value for flags: true when the application's rendering should be hardware accelerated.

int FLAG_IMMERSIVE

Bit in flags corresponding to an immersive activity that wishes not to be interrupted by notifications.

int FLAG_MULTIPROCESS

Bit in flags indicating whether this activity is able to run in multiple processes.

int FLAG_NO_HISTORY

Bit in flags indicating that, when the user navigates away from an activity, it should be finished.

int FLAG_PREFER_MINIMAL_POST_PROCESSING

Bit in flags indicating whether the display should preferably be switched to a minimal post processing mode.

int FLAG_RELINQUISH_TASK_IDENTITY

Bit in flags: If set, a task rooted at this activity will have its baseIntent replaced by the activity immediately above this.

int FLAG_RESUME_WHILE_PAUSING

Bit in flags indicating that this activity can start is creation/resume while the previous activity is still pausing.

int FLAG_SINGLE_USER

Bit in flags: If set, a single instance of the receiver will run for all users on the device.

int FLAG_STATE_NOT_NEEDED

Bit in flags indicating that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack.

int LAUNCH_MULTIPLE

Constant corresponding to standard in the R.attr.launchMode attribute.

int LAUNCH_SINGLE_INSTANCE

Constant corresponding to singleInstance in the R.attr.launchMode attribute.

int LAUNCH_SINGLE_INSTANCE_PER_TASK

Constant corresponding to singleInstancePerTask in the R.attr.launchMode attribute.

int LAUNCH_SINGLE_TASK

Constant corresponding to singleTask in the R.attr.launchMode attribute.

int LAUNCH_SINGLE_TOP

Constant corresponding to singleTop in the R.attr.launchMode attribute.

int PERSIST_ACROSS_REBOOTS

Constant corresponding to persistAcrossReboots in the R.attr.persistableMode attribute.

int PERSIST_NEVER

Constant corresponding to doNotPersist in the R.attr.persistableMode attribute.

int PERSIST_ROOT_ONLY

Constant corresponding to persistRootOnly in the R.attr.persistableMode attribute.

int SCREEN_ORIENTATION_BEHIND

Constant corresponding to behind in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_FULL_SENSOR

Constant corresponding to fullSensor in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_FULL_USER

Constant corresponding to fullUser in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_LANDSCAPE

Constant corresponding to landscape in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_LOCKED

Constant corresponding to locked in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_NOSENSOR

Constant corresponding to nosensor in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_PORTRAIT

Constant corresponding to portrait in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_REVERSE_LANDSCAPE

Constant corresponding to reverseLandscape in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_REVERSE_PORTRAIT

Constant corresponding to reversePortrait in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_SENSOR

Constant corresponding to sensor in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_SENSOR_LANDSCAPE

Constant corresponding to sensorLandscape in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_SENSOR_PORTRAIT

Constant corresponding to sensorPortrait in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_UNSPECIFIED

Constant corresponding to unspecified in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_USER

Constant corresponding to user in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_USER_LANDSCAPE

Constant corresponding to userLandscape in the R.attr.screenOrientation attribute.

int SCREEN_ORIENTATION_USER_PORTRAIT

Constant corresponding to userPortrait in the R.attr.screenOrientation attribute.

int UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW

Flag for use with uiOptions.

Inherited constants

Fields

public static final Creator<ActivityInfo> CREATOR

public int colorMode

The color mode requested by this activity.

public int configChanges

Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system).

public int documentLaunchMode

The document launch mode style requested by the activity.

public int flags

Options that have been set in the activity declaration in the manifest.

public int launchMode

The launch mode style requested by the activity.

public int maxRecents

The maximum number of tasks rooted at this activity that can be in the recent task list.

public String parentActivityName

If defined, the activity named here is the logical parent of this activity.

public String permission

Optional name of a permission required to be able to access this Activity.

public int persistableMode

Value indicating how this activity is to be persisted across reboots for restoring in the Recents list.

public String requiredDisplayCategory

Specifies the required display category of the activity.

public int screenOrientation

The preferred screen orientation this activity would like to run in.

public int softInputMode

The desired soft input mode for this activity's main window.

public String targetActivity

If this is an activity alias, this is the real activity class to run for it.

public String taskAffinity

The affinity this activity has for another task in the system.

public int theme

A style resource identifier (in the package's resources) of this activity's theme.

public int uiOptions

The desired extra UI options for this activity and its main window.

public ActivityInfo.WindowLayout windowLayout

Information about desired position and size of activity on the display when it is first started.

Inherited fields

Public constructors

ActivityInfo()
ActivityInfo(ActivityInfo orig)

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

void dump(Printer pw, String prefix)
Set<String> getKnownActivityEmbeddingCerts()

Gets the trusted host certificate digests of apps that are allowed to embed this activity.

final int getThemeResource()

Return the theme resource identifier to use for this activity.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int parcelableFlags)

Inherited methods

Constants

COLOR_MODE_DEFAULT

Added in API level 26
public static final int COLOR_MODE_DEFAULT

Value for colorMode indicating that the activity should use the default color mode (sRGB, low dynamic range).

See also:

Constant Value: 0 (0x00000000)

COLOR_MODE_HDR

Added in API level 26
public static final int COLOR_MODE_HDR

Value of colorMode indicating that the activity should use a high dynamic range if the presentation display supports it.

See also:

Constant Value: 2 (0x00000002)

COLOR_MODE_WIDE_COLOR_GAMUT

Added in API level 26
public static final int COLOR_MODE_WIDE_COLOR_GAMUT

Value of colorMode indicating that the activity should use a wide color gamut if the presentation display supports it.

See also:

Constant Value: 1 (0x00000001)

CONFIG_COLOR_MODE

Added in API level 26
public static final int CONFIG_COLOR_MODE

Bit in configChanges that indicates that the activity can itself handle the change to the display color gamut or dynamic range. Set from the R.attr.configChanges attribute.

Constant Value: 16384 (0x00004000)

CONFIG_DENSITY

Added in API level 17
public static final int CONFIG_DENSITY

Bit in configChanges that indicates that the activity can itself handle density changes. Set from the R.attr.configChanges attribute.

Constant Value: 4096 (0x00001000)

CONFIG_FONT_SCALE

Added in API level 1
public static final int CONFIG_FONT_SCALE

Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor. Set from the R.attr.configChanges attribute. This is not a core resource configuration, but a higher-level value, so its constant starts at the high bits.

Constant Value: 1073741824 (0x40000000)

CONFIG_FONT_WEIGHT_ADJUSTMENT

Added in API level 31
public static final int CONFIG_FONT_WEIGHT_ADJUSTMENT

Bit in configChanges that indicates that the activity can itself handle changes to font weight. Set from the R.attr.configChanges attribute. This is not a core resource configuration, but a higher-level value, so its constant starts at the high bits.

Constant Value: 268435456 (0x10000000)

CONFIG_GRAMMATICAL_GENDER

Added in API level 34
public static final int CONFIG_GRAMMATICAL_GENDER

Bit in configChanges that indicates that the activity can itself handle the change to gender. Set from the R.attr.configChanges attribute.

Constant Value: 32768 (0x00008000)

CONFIG_KEYBOARD

Added in API level 1
public static final int CONFIG_KEYBOARD

Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type. Set from the R.attr.configChanges attribute.

Constant Value: 16 (0x00000010)

CONFIG_KEYBOARD_HIDDEN

Added in API level 1
public static final int CONFIG_KEYBOARD_HIDDEN

Bit in configChanges that indicates that the activity can itself handle changes to the keyboard or navigation being hidden/exposed. Note that inspite of the name, this applies to the changes to any hidden states: keyboard or navigation. Set from the R.attr.configChanges attribute.

Constant Value: 32 (0x00000020)

CONFIG_LAYOUT_DIRECTION

Added in API level 17
public static final int CONFIG_LAYOUT_DIRECTION

Bit in configChanges that indicates that the activity can itself handle the change to layout direction. Set from the R.attr.configChanges attribute.

Constant Value: 8192 (0x00002000)

CONFIG_LOCALE

Added in API level 1
public static final int CONFIG_LOCALE

Bit in configChanges that indicates that the activity can itself handle changes to the locale. Set from the R.attr.configChanges attribute.

Constant Value: 4 (0x00000004)

CONFIG_MCC

Added in API level 1
public static final int CONFIG_MCC

Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MCC. Set from the R.attr.configChanges attribute.

Constant Value: 1 (0x00000001)

CONFIG_MNC

Added in API level 1
public static final int CONFIG_MNC

Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MNC. Set from the R.attr.configChanges attribute.

Constant Value: 2 (0x00000002)

CONFIG_NAVIGATION

Added in API level 1
public static final int CONFIG_NAVIGATION

Bit in configChanges that indicates that the activity can itself handle changes to the navigation type. Set from the R.attr.configChanges attribute.

Constant Value: 64 (0x00000040)

CONFIG_ORIENTATION

Added in API level 1
public static final int CONFIG_ORIENTATION

Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation. Set from the R.attr.configChanges attribute.

Constant Value: 128 (0x00000080)

CONFIG_SCREEN_LAYOUT

Added in API level 4
public static final int CONFIG_SCREEN_LAYOUT

Bit in configChanges that indicates that the activity can itself handle changes to the screen layout. Set from the R.attr.configChanges attribute.

Constant Value: 256 (0x00000100)

CONFIG_SCREEN_SIZE

Added in API level 13
public static final int CONFIG_SCREEN_SIZE

Bit in configChanges that indicates that the activity can itself handle the screen size. Set from the R.attr.configChanges attribute. This will be set by default for applications that target an earlier version than Build.VERSION_CODES.HONEYCOMB_MR2... however, you will not see the bit set here becomes some applications incorrectly compare configChanges against an absolute value rather than correctly masking out the bits they are interested in. Please don't do that, thanks.

Constant Value: 1024 (0x00000400)

CONFIG_SMALLEST_SCREEN_SIZE

Added in API level 13
public static final int CONFIG_SMALLEST_SCREEN_SIZE

Bit in configChanges that indicates that the activity can itself handle the smallest screen size. Set from the R.attr.configChanges attribute. This will be set by default for applications that target an earlier version than Build.VERSION_CODES.HONEYCOMB_MR2... however, you will not see the bit set here becomes some applications incorrectly compare configChanges against an absolute value rather than correctly masking out the bits they are interested in. Please don't do that, thanks.

Constant Value: 2048 (0x00000800)

CONFIG_TOUCHSCREEN

Added in API level 1
public static final int CONFIG_TOUCHSCREEN

Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type. Set from the R.attr.configChanges attribute.

Constant Value: 8 (0x00000008)

CONFIG_UI_MODE

Added in API level 8
public static final int CONFIG_UI_MODE

Bit in configChanges that indicates that the activity can itself handle the ui mode. Set from the R.attr.configChanges attribute.

Constant Value: 512 (0x00000200)

DOCUMENT_LAUNCH_ALWAYS

Added in API level 21
public static final int DOCUMENT_LAUNCH_ALWAYS

Constant corresponding to always in the R.attr.documentLaunchMode attribute.

Constant Value: 2 (0x00000002)

DOCUMENT_LAUNCH_INTO_EXISTING

Added in API level 21
public static final int DOCUMENT_LAUNCH_INTO_EXISTING

Constant corresponding to intoExisting in the R.attr.documentLaunchMode attribute.

Constant Value: 1 (0x00000001)

DOCUMENT_LAUNCH_NEVER

Added in API level 21
public static final int DOCUMENT_LAUNCH_NEVER

Constant corresponding to never in the R.attr.documentLaunchMode attribute.

Constant Value: 3 (0x00000003)

DOCUMENT_LAUNCH_NONE

Added in API level 21
public static final int DOCUMENT_LAUNCH_NONE

Constant corresponding to none in the R.attr.documentLaunchMode attribute.

Constant Value: 0 (0x00000000)

FLAG_ALLOW_TASK_REPARENTING

Added in API level 1
public static final int FLAG_ALLOW_TASK_REPARENTING

Bit in flags that indicates that the activity can be moved between tasks based on its task affinity. Set from the R.attr.allowTaskReparenting attribute.

Constant Value: 64 (0x00000040)

FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING

Added in API level 33
public static final int FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING

Bit in flags: If set, indicates that the activity can be embedded by untrusted hosts. In this case the interactions with and visibility of the embedded activity may be limited. Set from the R.attr.allowUntrustedActivityEmbedding attribute.

Constant Value: 268435456 (0x10000000)

FLAG_ALWAYS_RETAIN_TASK_STATE

Added in API level 1
public static final int FLAG_ALWAYS_RETAIN_TASK_STATE

Bit in flags indicating that, when the activity is the root of a task, that task's stack should never be cleared when it is relaunched from home. Set from the R.attr.alwaysRetainTaskState attribute.

Constant Value: 8 (0x00000008)

FLAG_AUTO_REMOVE_FROM_RECENTS

Added in API level 21
public static final int FLAG_AUTO_REMOVE_FROM_RECENTS

Bit in flags indicating that tasks started with this activity are to be removed from the recent list of tasks when the last activity in the task is finished. Corresponds to R.attr.autoRemoveFromRecents

Constant Value: 8192 (0x00002000)

FLAG_CLEAR_TASK_ON_LAUNCH

Added in API level 1
public static final int FLAG_CLEAR_TASK_ON_LAUNCH

Bit in flags indicating that, when the activity is the root of a task, that task's stack should be cleared each time the user re-launches it from home. As a result, the user will always return to the original activity at the top of the task. This flag only applies to activities that are used to start the root of a new task. Set from the R.attr.clearTaskOnLaunch attribute.

Constant Value: 4 (0x00000004)

FLAG_ENABLE_VR_MODE

Added in API level 24
public static final int FLAG_ENABLE_VR_MODE

Bit in flags indicating that this activity should be run with VR mode enabled.

Constant Value: 32768 (0x00008000)

FLAG_EXCLUDE_FROM_RECENTS

Added in API level 1
public static final int FLAG_EXCLUDE_FROM_RECENTS

Bit in flags that indicates that the activity should not appear in the list of recently launched activities. Set from the R.attr.excludeFromRecents attribute.

Constant Value: 32 (0x00000020)

FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS

Added in API level 5
public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS

Bit in flags indicating that, when a request to close system windows happens, this activity is finished. Set from the R.attr.finishOnCloseSystemDialogs attribute.

Constant Value: 256 (0x00000100)

FLAG_FINISH_ON_TASK_LAUNCH

Added in API level 1
public static final int FLAG_FINISH_ON_TASK_LAUNCH

Bit in flags indicating that, when the activity's task is relaunched from home, this activity should be finished. Set from the R.attr.finishOnTaskLaunch attribute.

Constant Value: 2 (0x00000002)

FLAG_HARDWARE_ACCELERATED

Added in API level 11
public static final int FLAG_HARDWARE_ACCELERATED

Value for flags: true when the application's rendering should be hardware accelerated.

Constant Value: 512 (0x00000200)

FLAG_IMMERSIVE

Added in API level 18
public static final int FLAG_IMMERSIVE

Bit in flags corresponding to an immersive activity that wishes not to be interrupted by notifications. Applications that hide the system notification bar with WindowManager.LayoutParams.FLAG_FULLSCREEN may still be interrupted by high-priority notifications; for example, an incoming phone call may use fullScreenIntent to present a full-screen in-call activity to the user, pausing the current activity as a side-effect. An activity with FLAG_IMMERSIVE set, however, will not be interrupted; the notification may be shown in some other way (such as a small floating "toast" window). Note that this flag will always reflect the Activity's android:immersive manifest definition, even if the Activity's immersive state is changed at runtime via Activity.setImmersive(boolean).

Constant Value: 2048 (0x00000800)

FLAG_MULTIPROCESS

Added in API level 1
public static final int FLAG_MULTIPROCESS

Bit in flags indicating whether this activity is able to run in multiple processes. If true, the system may instantiate it in the some process as the process starting it in order to conserve resources. If false, the default, it always runs in ComponentInfo.processName. Set from the R.attr.multiprocess attribute.

Constant Value: 1 (0x00000001)

FLAG_NO_HISTORY

Added in API level 3
public static final int FLAG_NO_HISTORY

Bit in flags indicating that, when the user navigates away from an activity, it should be finished. Set from the R.attr.noHistory attribute.

Constant Value: 128 (0x00000080)

FLAG_PREFER_MINIMAL_POST_PROCESSING

Added in API level 30
public static final int FLAG_PREFER_MINIMAL_POST_PROCESSING

Bit in flags indicating whether the display should preferably be switched to a minimal post processing mode. See R.attr.preferMinimalPostProcessing

Constant Value: 33554432 (0x02000000)

FLAG_RELINQUISH_TASK_IDENTITY

Added in API level 21
public static final int FLAG_RELINQUISH_TASK_IDENTITY

Bit in flags: If set, a task rooted at this activity will have its baseIntent replaced by the activity immediately above this. Each activity may further relinquish its identity to the activity above it using this flag. Set from the R.attr.relinquishTaskIdentity attribute.

Constant Value: 4096 (0x00001000)

FLAG_RESUME_WHILE_PAUSING

Added in API level 21
public static final int FLAG_RESUME_WHILE_PAUSING

Bit in flags indicating that this activity can start is creation/resume while the previous activity is still pausing. Corresponds to R.attr.resumeWhilePausing

Constant Value: 16384 (0x00004000)

FLAG_SINGLE_USER

Added in API level 17
public static final int FLAG_SINGLE_USER

Bit in flags: If set, a single instance of the receiver will run for all users on the device. Set from the R.attr.singleUser attribute. Note that this flag is only relevant for ActivityInfo structures that are describing receiver components; it is not applied to activities.

Constant Value: 1073741824 (0x40000000)

FLAG_STATE_NOT_NEEDED

Added in API level 1
public static final int FLAG_STATE_NOT_NEEDED

Bit in flags indicating that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack. Set from the R.attr.stateNotNeeded attribute.

Constant Value: 16 (0x00000010)

LAUNCH_MULTIPLE

Added in API level 1
public static final int LAUNCH_MULTIPLE

Constant corresponding to standard in the R.attr.launchMode attribute.

Constant Value: 0 (0x00000000)

LAUNCH_SINGLE_INSTANCE

Added in API level 1
public static final int LAUNCH_SINGLE_INSTANCE

Constant corresponding to singleInstance in the R.attr.launchMode attribute.

Constant Value: 3 (0x00000003)

LAUNCH_SINGLE_INSTANCE_PER_TASK

Added in API level 31
public static final int LAUNCH_SINGLE_INSTANCE_PER_TASK

Constant corresponding to singleInstancePerTask in the R.attr.launchMode attribute.

Constant Value: 4 (0x00000004)

LAUNCH_SINGLE_TASK

Added in API level 1
public static final int LAUNCH_SINGLE_TASK

Constant corresponding to singleTask in the R.attr.launchMode attribute.

Constant Value: 2 (0x00000002)

LAUNCH_SINGLE_TOP

Added in API level 1
public static final int LAUNCH_SINGLE_TOP

Constant corresponding to singleTop in the R.attr.launchMode attribute.

Constant Value: 1 (0x00000001)

PERSIST_ACROSS_REBOOTS

Added in API level 21
public static final int PERSIST_ACROSS_REBOOTS

Constant corresponding to persistAcrossReboots in the R.attr.persistableMode attribute.

Constant Value: 2 (0x00000002)

PERSIST_NEVER

Added in API level 21
public static final int PERSIST_NEVER

Constant corresponding to doNotPersist in the R.attr.persistableMode attribute.

Constant Value: 1 (0x00000001)

PERSIST_ROOT_ONLY

Added in API level 21
public static final int PERSIST_ROOT_ONLY

Constant corresponding to persistRootOnly in the R.attr.persistableMode attribute.

Constant Value: 0 (0x00000000)

SCREEN_ORIENTATION_BEHIND

Added in API level 1
public static final int SCREEN_ORIENTATION_BEHIND

Constant corresponding to behind in the R.attr.screenOrientation attribute.

Constant Value: 3 (0x00000003)

SCREEN_ORIENTATION_FULL_SENSOR

Added in API level 9
public static final int SCREEN_ORIENTATION_FULL_SENSOR

Constant corresponding to fullSensor in the R.attr.screenOrientation attribute.

Constant Value: 10 (0x0000000a)

SCREEN_ORIENTATION_FULL_USER

Added in API level 18
public static final int SCREEN_ORIENTATION_FULL_USER

Constant corresponding to fullUser in the R.attr.screenOrientation attribute.

Constant Value: 13 (0x0000000d)

SCREEN_ORIENTATION_LANDSCAPE

Added in API level 1
public static final int SCREEN_ORIENTATION_LANDSCAPE

Constant corresponding to landscape in the R.attr.screenOrientation attribute.

Constant Value: 0 (0x00000000)

SCREEN_ORIENTATION_LOCKED

Added in API level 18
public static final int SCREEN_ORIENTATION_LOCKED

Constant corresponding to locked in the R.attr.screenOrientation attribute.

Constant Value: 14 (0x0000000e)

SCREEN_ORIENTATION_NOSENSOR

Added in API level 1
public static final int SCREEN_ORIENTATION_NOSENSOR

Constant corresponding to nosensor in the R.attr.screenOrientation attribute.

Constant Value: 5 (0x00000005)

SCREEN_ORIENTATION_PORTRAIT

Added in API level 1
public static final int SCREEN_ORIENTATION_PORTRAIT

Constant corresponding to portrait in the R.attr.screenOrientation attribute.

Constant Value: 1 (0x00000001)

SCREEN_ORIENTATION_REVERSE_LANDSCAPE

Added in API level 9
public static final int SCREEN_ORIENTATION_REVERSE_LANDSCAPE

Constant corresponding to reverseLandscape in the R.attr.screenOrientation attribute.

Constant Value: 8 (0x00000008)

SCREEN_ORIENTATION_REVERSE_PORTRAIT

Added in API level 9
public static final int SCREEN_ORIENTATION_REVERSE_PORTRAIT

Constant corresponding to reversePortrait in the R.attr.screenOrientation attribute.

Constant Value: 9 (0x00000009)

SCREEN_ORIENTATION_SENSOR

Added in API level 1
public static final int SCREEN_ORIENTATION_SENSOR

Constant corresponding to sensor in the R.attr.screenOrientation attribute.

Constant Value: 4 (0x00000004)

SCREEN_ORIENTATION_SENSOR_LANDSCAPE

Added in API level 9
public static final int SCREEN_ORIENTATION_SENSOR_LANDSCAPE

Constant corresponding to sensorLandscape in the R.attr.screenOrientation attribute.

Constant Value: 6 (0x00000006)

SCREEN_ORIENTATION_SENSOR_PORTRAIT

Added in API level 9
public static final int SCREEN_ORIENTATION_SENSOR_PORTRAIT

Constant corresponding to sensorPortrait in the R.attr.screenOrientation attribute.

Constant Value: 7 (0x00000007)

SCREEN_ORIENTATION_UNSPECIFIED

Added in API level 1
public static final int SCREEN_ORIENTATION_UNSPECIFIED

Constant corresponding to unspecified in the R.attr.screenOrientation attribute.

Constant Value: -1 (0xffffffff)

SCREEN_ORIENTATION_USER

Added in API level 1
public static final int SCREEN_ORIENTATION_USER

Constant corresponding to user in the R.attr.screenOrientation attribute.

Constant Value: 2 (0x00000002)

SCREEN_ORIENTATION_USER_LANDSCAPE

Added in API level 18
public static final int SCREEN_ORIENTATION_USER_LANDSCAPE

Constant corresponding to userLandscape in the R.attr.screenOrientation attribute.

Constant Value: 11 (0x0000000b)

SCREEN_ORIENTATION_USER_PORTRAIT

Added in API level 18
public static final int SCREEN_ORIENTATION_USER_PORTRAIT

Constant corresponding to userPortrait in the R.attr.screenOrientation attribute.

Constant Value: 12 (0x0000000c)

UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW

Added in API level 14
public static final int UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW

Flag for use with uiOptions. Indicates that the action bar should put all action items in a separate bar when the screen is narrow.

This value corresponds to "splitActionBarWhenNarrow" for the uiOptions XML attribute.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 1
public static final Creator<ActivityInfo> CREATOR

colorMode

Added in API level 26
public int colorMode

The color mode requested by this activity. The target display may not be able to honor the request.
Value is COLOR_MODE_DEFAULT, COLOR_MODE_WIDE_COLOR_GAMUT, COLOR_MODE_HDR, or android.content.pm.ActivityInfo.COLOR_MODE_A8

configChanges

Added in API level 1
public int configChanges

Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). Contains any combination of CONFIG_FONT_SCALE, CONFIG_MCC, CONFIG_MNC, CONFIG_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_NAVIGATION, CONFIG_ORIENTATION, CONFIG_SCREEN_LAYOUT, CONFIG_DENSITY, CONFIG_LAYOUT_DIRECTION, CONFIG_COLOR_MODE, and {link #CONFIG_GRAMMATICAL_GENDER}. Set from the R.attr.configChanges attribute.

documentLaunchMode

Added in API level 21
public int documentLaunchMode

The document launch mode style requested by the activity. From the R.attr.documentLaunchMode attribute, one of DOCUMENT_LAUNCH_NONE, DOCUMENT_LAUNCH_INTO_EXISTING, DOCUMENT_LAUNCH_ALWAYS.

Modes DOCUMENT_LAUNCH_ALWAYS and DOCUMENT_LAUNCH_INTO_EXISTING are equivalent to Intent.FLAG_ACTIVITY_NEW_DOCUMENT with and without Intent.FLAG_ACTIVITY_MULTIPLE_TASK respectively.

launchMode

Added in API level 1
public int launchMode

The launch mode style requested by the activity. From the R.attr.launchMode attribute.
Value is LAUNCH_MULTIPLE, LAUNCH_SINGLE_TOP, LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE, or LAUNCH_SINGLE_INSTANCE_PER_TASK

maxRecents

Added in API level 21
public int maxRecents

The maximum number of tasks rooted at this activity that can be in the recent task list. Refer to R.attr.maxRecents.

parentActivityName

Added in API level 16
public String parentActivityName

If defined, the activity named here is the logical parent of this activity.

permission

Added in API level 1
public String permission

Optional name of a permission required to be able to access this Activity. From the "permission" attribute.

persistableMode

Added in API level 21
public int persistableMode

Value indicating how this activity is to be persisted across reboots for restoring in the Recents list. R.attr.persistableMode

requiredDisplayCategory

Added in API level 34
public String requiredDisplayCategory

Specifies the required display category of the activity. Set from the R.attr.requiredDisplayCategory attribute. Upon creation, a display can specify which display categories it supports and one of the category must be present in the <activity> element to allow this activity to run. The default value is null, which indicates the activity does not have a required display category and thus can only run on a display that didn't specify any display categories. Each activity can only specify one required category but a display can support multiple display categories.

This field should be formatted as a Java-language-style free form string(for example, com.google.automotive_entertainment), which may contain uppercase or lowercase letters ('A' through 'Z'), numbers, and underscores ('_') but may only start with letters.

screenOrientation

Added in API level 1
public int screenOrientation

The preferred screen orientation this activity would like to run in. From the R.attr.screenOrientation attribute, one of SCREEN_ORIENTATION_UNSPECIFIED, SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, SCREEN_ORIENTATION_USER, SCREEN_ORIENTATION_BEHIND, SCREEN_ORIENTATION_SENSOR, SCREEN_ORIENTATION_NOSENSOR, SCREEN_ORIENTATION_SENSOR_LANDSCAPE, SCREEN_ORIENTATION_SENSOR_PORTRAIT, SCREEN_ORIENTATION_REVERSE_LANDSCAPE, SCREEN_ORIENTATION_REVERSE_PORTRAIT, SCREEN_ORIENTATION_FULL_SENSOR, SCREEN_ORIENTATION_USER_LANDSCAPE, SCREEN_ORIENTATION_USER_PORTRAIT, SCREEN_ORIENTATION_FULL_USER, SCREEN_ORIENTATION_LOCKED,
Value is android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET, SCREEN_ORIENTATION_UNSPECIFIED, SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, SCREEN_ORIENTATION_USER, SCREEN_ORIENTATION_BEHIND, SCREEN_ORIENTATION_SENSOR, SCREEN_ORIENTATION_NOSENSOR, SCREEN_ORIENTATION_SENSOR_LANDSCAPE, SCREEN_ORIENTATION_SENSOR_PORTRAIT, SCREEN_ORIENTATION_REVERSE_LANDSCAPE, SCREEN_ORIENTATION_REVERSE_PORTRAIT, SCREEN_ORIENTATION_FULL_SENSOR, SCREEN_ORIENTATION_USER_LANDSCAPE, SCREEN_ORIENTATION_USER_PORTRAIT, SCREEN_ORIENTATION_FULL_USER, or SCREEN_ORIENTATION_LOCKED

softInputMode

Added in API level 3
public int softInputMode

The desired soft input mode for this activity's main window. Set from the R.attr.windowSoftInputMode attribute in the activity's manifest. May be any of the same values allowed for WindowManager.LayoutParams.softInputMode. If 0 (unspecified), the mode from the theme will be used.
Value is either 0 or a combination of WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED, WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED, WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN, WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING, and WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION

targetActivity

Added in API level 1
public String targetActivity

If this is an activity alias, this is the real activity class to run for it. Otherwise, this is null.

taskAffinity

Added in API level 1
public String taskAffinity

The affinity this activity has for another task in the system. The string here is the name of the task, often the package name of the overall package. If null, the activity has no affinity. Set from the R.attr.taskAffinity attribute.

theme

Added in API level 1
public int theme

A style resource identifier (in the package's resources) of this activity's theme. From the "theme" attribute or, if not set, 0.

uiOptions

Added in API level 14
public int uiOptions

The desired extra UI options for this activity and its main window. Set from the R.attr.uiOptions attribute in the activity's manifest.

windowLayout

Added in API level 24
public ActivityInfo.WindowLayout windowLayout

Information about desired position and size of activity on the display when it is first started.

Public constructors

ActivityInfo

Added in API level 1
public ActivityInfo ()

ActivityInfo

Added in API level 1
public ActivityInfo (ActivityInfo orig)

Parameters
orig ActivityInfo

Public methods

describeContents

Added in API level 1
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

dump

Added in API level 1
public void dump (Printer pw, 
                String prefix)

Parameters
pw Printer

prefix String

getKnownActivityEmbeddingCerts

Added in API level 33
public Set<String> getKnownActivityEmbeddingCerts ()

Gets the trusted host certificate digests of apps that are allowed to embed this activity. The digests are computed using the SHA-256 digest algorithm.

Returns
Set<String> This value cannot be null.

getThemeResource

Added in API level 1
public final int getThemeResource ()

Return the theme resource identifier to use for this activity. If the activity defines a theme, that is used; else, the application theme is used.

Returns
int The theme associated with this activity.

toString

Added in API level 1
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 1
public void writeToParcel (Parcel dest, 
                int parcelableFlags)

Parameters
dest Parcel

parcelableFlags int