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
Constants
Fields
| public |
|
|
int |
configChanges |
Bit mask of kinds of configuration changes that this activity
can handle itself (without being restarted by the system). |
| public |
|
|
int |
flags |
Options that have been set in the activity declaration in the
manifest: MULTIPROCESS_FLAG,
CLEAR_ON_BACKGROUND_FLAG, STATE_NOT_NEEDED_FLAG. |
| public |
|
|
int |
launchMode |
The launch mode style requested by the activity. |
| public |
|
|
String |
permission |
Optional name of a permission required to be able to access this
Activity. |
| 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 |
|
|
ApplicationInfo |
applicationInfo |
Global information about the application/package this component is a
part of. |
| public |
|
|
boolean |
enabled |
Indicates whether or not this component may be instantiated. |
| public |
|
|
String |
processName |
The name of the process this component should run in. |
| public |
|
|
int |
icon |
A drawable resource identifier (in the package's resources) of this
component's icon. |
| public |
|
|
int |
labelRes |
A string resource identifier (in the package's resources) of this
component's label. |
| public |
|
|
Bundle |
metaData |
Additional meta-data associated with this component. |
| public |
|
|
String |
name |
Public name of this item. |
| public |
|
|
CharSequence |
nonLocalizedLabel |
The string provided in the AndroidManifest file, if any. |
| public |
|
|
String |
packageName |
Name of the package that this item is in. |
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
public
static
final
int
CLEAR_ON_BACKGROUND_FLAG
Bit in
flags that indicates that the activity's stack should
be cleared
when it moves to the background. When the user next brings the
task to the front, they will return to the original activity at
the top of the tasks. This flag only applies to activities that
are used to start the root of a new task. Set from the
clearOnBackground attribute.
Constant Value:
2
(0x00000002)
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
configChanges attribute.
Constant Value:
1
(0x00000001)
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
configChanges attribute.
Constant Value:
8
(0x00000008)
public
static
final
int
CONFIG_KEYBOARD_HIDDEN
Bit in
configChanges that indicates that the activity
can itself handle changes to the keyboard being hidden/exposed.
Set from the
configChanges attribute.
Constant Value:
16
(0x00000010)
public
static
final
int
CONFIG_LOCALE
Bit in
configChanges that indicates that the activity
can itself handle changes to the locale. Set from the
configChanges attribute.
Constant Value:
2
(0x00000002)
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
configChanges attribute.
Constant Value:
32
(0x00000020)
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
configChanges attribute.
Constant Value:
64
(0x00000040)
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
configChanges attribute.
Constant Value:
4
(0x00000004)
public
static
final
Creator
CREATOR
public
static
final
int
EXCLUDE_FROM_RECENTS_FLAG
Bit in
flags that indicates that the activity should not
appear in the list of recently launched activities. Set from the
excludeFromRecents attribute.
Constant Value:
8
(0x00000008)
public
static
final
int
MULTIPLE_LAUNCH
Constant corresponding to
multiple in
the
launchMode attribute.
Constant Value:
0
(0x00000000)
public
static
final
int
MULTIPROCESS_FLAG
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.
Constant Value:
1
(0x00000001)
public
static
final
int
SINGLE_INSTANCE_LAUNCH
Constant corresponding to
singleInstance in
the
launchMode attribute.
Constant Value:
3
(0x00000003)
public
static
final
int
SINGLE_TASK_LAUNCH
Constant corresponding to
singleTask in
the
launchMode attribute.
Constant Value:
2
(0x00000002)
public
static
final
int
SINGLE_TOP_LAUNCH
Constant corresponding to
singleTop in
the
launchMode attribute.
Constant Value:
1
(0x00000001)
public
static
final
int
STATE_NOT_NEEDED_FLAG
Bit in
flags that indicates 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 Value:
4
(0x00000004)
Fields
public
String
permission
Optional name of a permission required to be able to access this
Activity. From the "permission" attribute.
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. Specifying
an affinity allows an activity to be migrated over to another task
once the user has moved away from its current task. This comes from
the "taskAffinity" attribute.
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.
Public Constructors
Public Methods
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
- The theme associated with this activity.
public
String
toString()
Answers a string containing a concise, human-readable description of the
receiver.
public
void
writeToParcel(Parcel dest)