Added in API level 1

ActivityInfo


open class ActivityInfo : ComponentInfo, Parcelable
kotlin.Any
   ↳ 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

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

Constants
static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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.

static Int

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.

static Int

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.

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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.

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

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

static Int

Flag for use with uiOptions.

Inherited constants
Public constructors

Public methods
open Int

open Unit
dump(pw: Printer!, prefix: String!)

open MutableSet<String!>

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

Int

Return the theme resource identifier to use for this activity.

open String

open Unit
writeToParcel(dest: Parcel, parcelableFlags: Int)

Inherited functions
Properties
static Parcelable.Creator<ActivityInfo!>

Int

The color mode requested by this activity.

Int

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

Int

The document launch mode style requested by the activity.

Int

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

Int

The launch mode style requested by the activity.

Int

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

String!

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

String!

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

Int

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

String?

Specifies the required display category of the activity.

Int

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

Int

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

String!

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

String!

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

Int

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

Int

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

ActivityInfo.WindowLayout!

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

Inherited properties

Constants

COLOR_MODE_DEFAULT

Added in API level 26
static val COLOR_MODE_DEFAULT: Int

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

Value: 0

COLOR_MODE_HDR

Added in API level 26
static val COLOR_MODE_HDR: Int

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

Value: 2

COLOR_MODE_WIDE_COLOR_GAMUT

Added in API level 26
static val COLOR_MODE_WIDE_COLOR_GAMUT: Int

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

Value: 1

CONFIG_COLOR_MODE

Added in API level 26
static val CONFIG_COLOR_MODE: Int

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

Value: 16384

CONFIG_DENSITY

Added in API level 17
static val CONFIG_DENSITY: Int

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

Value: 4096

CONFIG_FONT_SCALE

Added in API level 1
static val CONFIG_FONT_SCALE: Int

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

Value: 1073741824

CONFIG_FONT_WEIGHT_ADJUSTMENT

Added in API level 31
static val CONFIG_FONT_WEIGHT_ADJUSTMENT: Int

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

Value: 268435456

CONFIG_GRAMMATICAL_GENDER

Added in API level 34
static val CONFIG_GRAMMATICAL_GENDER: Int

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

Value: 32768

CONFIG_KEYBOARD

Added in API level 1
static val CONFIG_KEYBOARD: Int

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

Value: 16

CONFIG_KEYBOARD_HIDDEN

Added in API level 1
static val CONFIG_KEYBOARD_HIDDEN: Int

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 android.R.attr#configChanges attribute.

Value: 32

CONFIG_LAYOUT_DIRECTION

Added in API level 17
static val CONFIG_LAYOUT_DIRECTION: Int

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

Value: 8192

CONFIG_LOCALE

Added in API level 1
static val CONFIG_LOCALE: Int

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

Value: 4

CONFIG_MCC

Added in API level 1
static val CONFIG_MCC: Int

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

Value: 1

CONFIG_MNC

Added in API level 1
static val CONFIG_MNC: Int

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

Value: 2

CONFIG_NAVIGATION

Added in API level 1
static val CONFIG_NAVIGATION: Int

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

Value: 64

CONFIG_ORIENTATION

Added in API level 1
static val CONFIG_ORIENTATION: Int

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

Value: 128

CONFIG_SCREEN_LAYOUT

Added in API level 4
static val CONFIG_SCREEN_LAYOUT: Int

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

Value: 256

CONFIG_SCREEN_SIZE

Added in API level 13
static val CONFIG_SCREEN_SIZE: Int

Bit in configChanges that indicates that the activity can itself handle the screen size. Set from the android.R.attr#configChanges attribute. This will be set by default for applications that target an earlier version than android.os.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.

Value: 1024

CONFIG_SMALLEST_SCREEN_SIZE

Added in API level 13
static val CONFIG_SMALLEST_SCREEN_SIZE: Int

Bit in configChanges that indicates that the activity can itself handle the smallest screen size. Set from the android.R.attr#configChanges attribute. This will be set by default for applications that target an earlier version than android.os.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.

Value: 2048

CONFIG_TOUCHSCREEN

Added in API level 1
static val CONFIG_TOUCHSCREEN: Int

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

Value: 8

CONFIG_UI_MODE

Added in API level 8
static val CONFIG_UI_MODE: Int

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

Value: 512

DOCUMENT_LAUNCH_ALWAYS

Added in API level 21
static val DOCUMENT_LAUNCH_ALWAYS: Int

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

Value: 2

DOCUMENT_LAUNCH_INTO_EXISTING

Added in API level 21
static val DOCUMENT_LAUNCH_INTO_EXISTING: Int

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

Value: 1

DOCUMENT_LAUNCH_NEVER

Added in API level 21
static val DOCUMENT_LAUNCH_NEVER: Int

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

Value: 3

DOCUMENT_LAUNCH_NONE

Added in API level 21
static val DOCUMENT_LAUNCH_NONE: Int

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

Value: 0

FLAG_ALLOW_TASK_REPARENTING

Added in API level 1
static val FLAG_ALLOW_TASK_REPARENTING: Int

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

Value: 64

FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING

Added in API level 33
static val FLAG_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING: Int

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 android.R.attr#allowUntrustedActivityEmbedding attribute.

Value: 268435456

FLAG_ALWAYS_RETAIN_TASK_STATE

Added in API level 1
static val FLAG_ALWAYS_RETAIN_TASK_STATE: Int

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 android.R.attr#alwaysRetainTaskState attribute.

Value: 8

FLAG_AUTO_REMOVE_FROM_RECENTS

Added in API level 21
static val FLAG_AUTO_REMOVE_FROM_RECENTS: Int

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 android.R.attr#autoRemoveFromRecents

Value: 8192

FLAG_CLEAR_TASK_ON_LAUNCH

Added in API level 1
static val FLAG_CLEAR_TASK_ON_LAUNCH: Int

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 android.R.attr#clearTaskOnLaunch attribute.

Value: 4

FLAG_ENABLE_VR_MODE

Added in API level 24
static val FLAG_ENABLE_VR_MODE: Int

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

Value: 32768

FLAG_EXCLUDE_FROM_RECENTS

Added in API level 1
static val FLAG_EXCLUDE_FROM_RECENTS: Int

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

Value: 32

FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS

Added in API level 5
static val FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS: Int

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

Value: 256

FLAG_FINISH_ON_TASK_LAUNCH

Added in API level 1
static val FLAG_FINISH_ON_TASK_LAUNCH: Int

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

Value: 2

FLAG_HARDWARE_ACCELERATED

Added in API level 11
static val FLAG_HARDWARE_ACCELERATED: Int

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

Value: 512

FLAG_IMMERSIVE

Added in API level 18
static val FLAG_IMMERSIVE: Int

Bit in flags corresponding to an immersive activity that wishes not to be interrupted by notifications. Applications that hide the system notification bar with android.view.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 android.app.Activity#setImmersive(boolean).

Value: 2048

FLAG_MULTIPROCESS

Added in API level 1
static val FLAG_MULTIPROCESS: Int

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 processName. Set from the android.R.attr#multiprocess attribute.

Value: 1

FLAG_NO_HISTORY

Added in API level 3
static val FLAG_NO_HISTORY: Int

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

Value: 128

FLAG_PREFER_MINIMAL_POST_PROCESSING

Added in API level 30
static val FLAG_PREFER_MINIMAL_POST_PROCESSING: Int

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

Value: 33554432

FLAG_RELINQUISH_TASK_IDENTITY

Added in API level 21
static val FLAG_RELINQUISH_TASK_IDENTITY: Int

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 android.R.attr#relinquishTaskIdentity attribute.

Value: 4096

FLAG_RESUME_WHILE_PAUSING

Added in API level 21
static val FLAG_RESUME_WHILE_PAUSING: Int

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

Value: 16384

FLAG_SINGLE_USER

Added in API level 17
static val FLAG_SINGLE_USER: Int

Bit in flags: If set, a single instance of the receiver will run for all users on the device. Set from the android.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.

Value: 1073741824

FLAG_STATE_NOT_NEEDED

Added in API level 1
static val FLAG_STATE_NOT_NEEDED: Int

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 android.R.attr#stateNotNeeded attribute.

Value: 16

LAUNCH_MULTIPLE

Added in API level 1
static val LAUNCH_MULTIPLE: Int

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

Value: 0

LAUNCH_SINGLE_INSTANCE

Added in API level 1
static val LAUNCH_SINGLE_INSTANCE: Int

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

Value: 3

LAUNCH_SINGLE_INSTANCE_PER_TASK

Added in API level 31
static val LAUNCH_SINGLE_INSTANCE_PER_TASK: Int

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

Value: 4

LAUNCH_SINGLE_TASK

Added in API level 1
static val LAUNCH_SINGLE_TASK: Int

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

Value: 2

LAUNCH_SINGLE_TOP

Added in API level 1
static val LAUNCH_SINGLE_TOP: Int

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

Value: 1

PERSIST_ACROSS_REBOOTS

Added in API level 21
static val PERSIST_ACROSS_REBOOTS: Int

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

Value: 2

PERSIST_NEVER

Added in API level 21
static val PERSIST_NEVER: Int

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

Value: 1

PERSIST_ROOT_ONLY

Added in API level 21
static val PERSIST_ROOT_ONLY: Int

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

Value: 0

SCREEN_ORIENTATION_BEHIND

Added in API level 1
static val SCREEN_ORIENTATION_BEHIND: Int

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

Value: 3

SCREEN_ORIENTATION_FULL_SENSOR

Added in API level 9
static val SCREEN_ORIENTATION_FULL_SENSOR: Int

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

Value: 10

SCREEN_ORIENTATION_FULL_USER

Added in API level 18
static val SCREEN_ORIENTATION_FULL_USER: Int

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

Value: 13

SCREEN_ORIENTATION_LANDSCAPE

Added in API level 1
static val SCREEN_ORIENTATION_LANDSCAPE: Int

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

Value: 0

SCREEN_ORIENTATION_LOCKED

Added in API level 18
static val SCREEN_ORIENTATION_LOCKED: Int

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

Value: 14

SCREEN_ORIENTATION_NOSENSOR

Added in API level 1
static val SCREEN_ORIENTATION_NOSENSOR: Int

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

Value: 5

SCREEN_ORIENTATION_PORTRAIT

Added in API level 1
static val SCREEN_ORIENTATION_PORTRAIT: Int

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

Value: 1

SCREEN_ORIENTATION_REVERSE_LANDSCAPE

Added in API level 9
static val SCREEN_ORIENTATION_REVERSE_LANDSCAPE: Int

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

Value: 8

SCREEN_ORIENTATION_REVERSE_PORTRAIT

Added in API level 9
static val SCREEN_ORIENTATION_REVERSE_PORTRAIT: Int

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

Value: 9

SCREEN_ORIENTATION_SENSOR

Added in API level 1
static val SCREEN_ORIENTATION_SENSOR: Int

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

Value: 4

SCREEN_ORIENTATION_SENSOR_LANDSCAPE

Added in API level 9
static val SCREEN_ORIENTATION_SENSOR_LANDSCAPE: Int

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

Value: 6

SCREEN_ORIENTATION_SENSOR_PORTRAIT

Added in API level 9
static val SCREEN_ORIENTATION_SENSOR_PORTRAIT: Int

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

Value: 7

SCREEN_ORIENTATION_UNSPECIFIED

Added in API level 1
static val SCREEN_ORIENTATION_UNSPECIFIED: Int

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

Value: -1

SCREEN_ORIENTATION_USER

Added in API level 1
static val SCREEN_ORIENTATION_USER: Int

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

Value: 2

SCREEN_ORIENTATION_USER_LANDSCAPE

Added in API level 18
static val SCREEN_ORIENTATION_USER_LANDSCAPE: Int

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

Value: 11

SCREEN_ORIENTATION_USER_PORTRAIT

Added in API level 18
static val SCREEN_ORIENTATION_USER_PORTRAIT: Int

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

Value: 12

UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW

Added in API level 14
static val UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW: Int

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.

Value: 1

Public constructors

ActivityInfo

Added in API level 1
ActivityInfo()

ActivityInfo

Added in API level 1
ActivityInfo(orig: ActivityInfo!)

Public methods

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

dump

Added in API level 1
open fun dump(
    pw: Printer!,
    prefix: String!
): Unit

getKnownActivityEmbeddingCerts

Added in API level 33
open fun getKnownActivityEmbeddingCerts(): MutableSet<String!>

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.

Return
MutableSet<String!> This value cannot be null.

getThemeResource

Added in API level 1
fun getThemeResource(): Int

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.

Return
Int The theme associated with this activity.

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    parcelableFlags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<ActivityInfo!>

colorMode

Added in API level 26
var colorMode: Int

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

configChanges

Added in API level 1
var configChanges: Int

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 android.R.attr#configChanges attribute.

documentLaunchMode

Added in API level 21
var documentLaunchMode: Int

The document launch mode style requested by the activity. From the android.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.

maxRecents

Added in API level 21
var maxRecents: Int

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

parentActivityName

Added in API level 16
var parentActivityName: String!

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

permission

Added in API level 1
var permission: String!

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

persistableMode

Added in API level 21
var persistableMode: Int

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

requiredDisplayCategory

Added in API level 34
var requiredDisplayCategory: String?

Specifies the required display category of the activity. Set from the android.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
var screenOrientation: Int

The preferred screen orientation this activity would like to run in. From the android.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, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_LANDSCAPE, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_PORTRAIT, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_BEHIND, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_NOSENSOR, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR_LANDSCAPE, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR_PORTRAIT, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_REVERSE_LANDSCAPE, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_REVERSE_PORTRAIT, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_FULL_SENSOR, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER_LANDSCAPE, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER_PORTRAIT, android.content.pm.ActivityInfo#SCREEN_ORIENTATION_FULL_USER, or android.content.pm.ActivityInfo#SCREEN_ORIENTATION_LOCKED

targetActivity

Added in API level 1
var targetActivity: String!

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
var taskAffinity: String!

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 android.R.attr#taskAffinity attribute.

theme

Added in API level 1
var theme: Int

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
var uiOptions: Int

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

windowLayout

Added in API level 24
var windowLayout: ActivityInfo.WindowLayout!

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