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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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_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 | FLAG_ALLOW_TASK_REPARENTING |
Bit in
flags
that indicates that the activity can be moved
between tasks based on its task affinity.
|
|||||||||
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_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_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_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
launchMode
attribute.
|
|||||||||
int | LAUNCH_SINGLE_INSTANCE |
Constant corresponding to
singleInstance
in
the
launchMode
attribute.
|
|||||||||
int | LAUNCH_SINGLE_TASK |
Constant corresponding to
singleTask
in
the
launchMode
attribute.
|
|||||||||
int | LAUNCH_SINGLE_TOP |
Constant corresponding to
singleTop
in
the
launchMode
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_BEHIND |
Constant corresponding to
behind
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_FULL_SENSOR |
Constant corresponding to
fullSensor
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_FULL_USER |
Constant corresponding to
fullUser
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_LANDSCAPE |
Constant corresponding to
landscape
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_LOCKED |
Constant corresponding to
locked
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_NOSENSOR |
Constant corresponding to
nosensor
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_PORTRAIT |
Constant corresponding to
portrait
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_REVERSE_LANDSCAPE |
Constant corresponding to
reverseLandscape
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_REVERSE_PORTRAIT |
Constant corresponding to
reversePortrait
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_SENSOR |
Constant corresponding to
sensor
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_SENSOR_LANDSCAPE |
Constant corresponding to
sensorLandscape
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_SENSOR_PORTRAIT |
Constant corresponding to
sensorPortrait
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_UNSPECIFIED |
Constant corresponding to
unspecified
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_USER |
Constant corresponding to
user
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_USER_LANDSCAPE |
Constant corresponding to
userLandscape
in
the
screenOrientation
attribute.
|
|||||||||
int | SCREEN_ORIENTATION_USER_PORTRAIT |
Constant corresponding to
userPortrait
in
the
screenOrientation
attribute.
|
|||||||||
int | UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW |
Flag for use with
uiOptions
.
|
[Expand]
Inherited Constants
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
CREATOR | ||||||||||
|
configChanges | Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). | |||||||||
|
flags | Options that have been set in the activity declaration in the manifest. | |||||||||
|
launchMode | The launch mode style requested by the activity. | |||||||||
|
parentActivityName | If defined, the activity named here is the logical parent of this activity. | |||||||||
|
permission | Optional name of a permission required to be able to access this Activity. | |||||||||
|
screenOrientation | The preferred screen orientation this activity would like to run in. | |||||||||
|
softInputMode | The desired soft input mode for this activity's main window. | |||||||||
|
targetActivity | If this is an activity alias, this is the real activity class to run for it. | |||||||||
|
taskAffinity | The affinity this activity has for another task in the system. | |||||||||
|
theme | A style resource identifier (in the package's resources) of this activity's theme. | |||||||||
|
uiOptions | The desired extra UI options for this activity and its main window. |
[Expand]
Inherited Fields
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.content.pm.ComponentInfo
|
|||||||||||
From class
android.content.pm.PackageItemInfo
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
||||||||||
|
|
||||||||||
|
Return the theme resource identifier to use for this activity.
|
||||||||||
|
Returns a string containing a concise, human-readable description of this
object.
|
||||||||||
|
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.content.pm.ComponentInfo
|
|||||||||||
From class
android.content.pm.PackageItemInfo
|
|||||||||||
From class
java.lang.Object
|
|||||||||||
From interface
android.os.Parcelable
|
Bit in
configChanges
that indicates that the activity
can itself handle density changes. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the font scaling factor. Set from the
configChanges
attribute. This is
not a core resource configuration, but a higher-level value, so its
constant starts at the high bits.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the keyboard type. Set from the
configChanges
attribute.
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
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle the change to layout direction. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the locale. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the IMSI MCC. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the IMSI MNC. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the navigation type. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the screen orientation. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the screen layout. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle the screen size. Set from the
configChanges
attribute. This will be
set by default for applications that target an earlier version
than
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.
Bit in
configChanges
that indicates that the activity
can itself handle the smallest screen size. Set from the
configChanges
attribute. This will be
set by default for applications that target an earlier version
than
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.
Bit in
configChanges
that indicates that the activity
can itself handle changes to the touchscreen type. Set from the
configChanges
attribute.
Bit in
configChanges
that indicates that the activity
can itself handle the ui mode. Set from the
configChanges
attribute.
Bit in
flags
that indicates that the activity can be moved
between tasks based on its task affinity. Set from the
allowTaskReparenting
attribute.
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
alwaysRetainTaskState
attribute.
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
clearTaskOnLaunch
attribute.
Bit in
flags
that indicates that the activity should not
appear in the list of recently launched activities. Set from the
excludeFromRecents
attribute.
Bit in
flags
indicating that, when a request to close system
windows happens, this activity is finished.
Set from the
finishOnCloseSystemDialogs
attribute.
Bit in
flags
indicating that, when the activity's task is
relaunched from home, this activity should be finished.
Set from the
finishOnTaskLaunch
attribute.
Value for
flags
: true when the application's rendering should
be hardware accelerated.
Bit in
flags
corresponding to an immersive activity
that wishes not to be interrupted by notifications.
Applications that hide the system notification bar with
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
setImmersive(boolean)
.
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
multiprocess
attribute.
Bit in
flags
: If set, a single instance of the receiver will
run for all users on the device. Set from the
singleUser
attribute. Note that this flag is
only relevant for ActivityInfo structures that are describing receiver
components; it is not applied to activities.
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
stateNotNeeded
attribute.
Constant corresponding to
standard
in
the
launchMode
attribute.
Constant corresponding to
singleInstance
in
the
launchMode
attribute.
Constant corresponding to
singleTask
in
the
launchMode
attribute.
Constant corresponding to
singleTop
in
the
launchMode
attribute.
Constant corresponding to
behind
in
the
screenOrientation
attribute.
Constant corresponding to
fullSensor
in
the
screenOrientation
attribute.
Constant corresponding to
fullUser
in
the
screenOrientation
attribute.
Constant corresponding to
landscape
in
the
screenOrientation
attribute.
Constant corresponding to
locked
in
the
screenOrientation
attribute.
Constant corresponding to
nosensor
in
the
screenOrientation
attribute.
Constant corresponding to
portrait
in
the
screenOrientation
attribute.
Constant corresponding to
reverseLandscape
in
the
screenOrientation
attribute.
Constant corresponding to
reversePortrait
in
the
screenOrientation
attribute.
Constant corresponding to
sensor
in
the
screenOrientation
attribute.
Constant corresponding to
sensorLandscape
in
the
screenOrientation
attribute.
Constant corresponding to
sensorPortrait
in
the
screenOrientation
attribute.
Constant corresponding to
unspecified
in
the
screenOrientation
attribute.
Constant corresponding to
user
in
the
screenOrientation
attribute.
Constant corresponding to
userLandscape
in
the
screenOrientation
attribute.
Constant corresponding to
userPortrait
in
the
screenOrientation
attribute.
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
and
CONFIG_LAYOUT_DIRECTION
. Set from the
configChanges
attribute.
Options that have been set in the activity declaration in the
manifest.
These include:
FLAG_MULTIPROCESS
,
FLAG_FINISH_ON_TASK_LAUNCH
,
FLAG_CLEAR_TASK_ON_LAUNCH
,
FLAG_ALWAYS_RETAIN_TASK_STATE
,
FLAG_STATE_NOT_NEEDED
,
FLAG_EXCLUDE_FROM_RECENTS
,
FLAG_ALLOW_TASK_REPARENTING
,
FLAG_NO_HISTORY
,
FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS
,
FLAG_HARDWARE_ACCELERATED
,
FLAG_SINGLE_USER
.
The launch mode style requested by the activity. From the
launchMode
attribute, one of
LAUNCH_MULTIPLE
,
LAUNCH_SINGLE_TOP
,
LAUNCH_SINGLE_TASK
, or
LAUNCH_SINGLE_INSTANCE
.
If defined, the activity named here is the logical parent of this activity.
Optional name of a permission required to be able to access this Activity. From the "permission" attribute.
The preferred screen orientation this activity would like to run in.
From the
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
,
The desired soft input mode for this activity's main window.
Set from the
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.
If this is an activity alias, this is the real activity class to run for it. Otherwise, this is null.
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
taskAffinity
attribute.
A style resource identifier (in the package's resources) of this activity's theme. From the "theme" attribute or, if not set, 0.
The desired extra UI options for this activity and its main window.
Set from the
uiOptions
attribute in the
activity's manifest.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
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 a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See
Writing a useful
toString
method
if you intend implementing your own
toString
method.