Android
android.content.pm
public class

android.content.pm.ActivityInfo

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

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

      Value  
int  CONFIG_FONT_SCALE  Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor.  1073741824  0x40000000 
int  CONFIG_KEYBOARD  Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type.  16  0x00000010 
int  CONFIG_KEYBOARD_HIDDEN  Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed.  32  0x00000020 
int  CONFIG_LOCALE  Bit in configChanges that indicates that the activity can itself handle changes to the locale.  0x00000004 
int  CONFIG_MCC  Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MCC.  0x00000001 
int  CONFIG_MNC  Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MNC.  0x00000002 
int  CONFIG_NAVIGATION  Bit in configChanges that indicates that the activity can itself handle changes to the navigation type.  64  0x00000040 
int  CONFIG_ORIENTATION  Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation.  128  0x00000080 
int  CONFIG_TOUCHSCREEN  Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type.  0x00000008 
Creator<ActivityInfo CREATOR       
int  FLAG_ALLOW_TASK_REPARENTING  Bit in flags that indicates that the activity can be moved between tasks based on its task affinity.  64  0x00000040 
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.  0x00000008 
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.  0x00000004 
int  FLAG_EXCLUDE_FROM_RECENTS  Bit in flags that indicates that the activity should not appear in the list of recently launched activities.  32  0x00000020 
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.  0x00000002 
int  FLAG_MULTIPROCESS  Bit in flags indicating whether this activity is able to run in multiple processes.  0x00000001 
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.  16  0x00000010 
int  LAUNCH_MULTIPLE  Constant corresponding to multiple in the launchMode attribute.  0x00000000 
int  LAUNCH_SINGLE_INSTANCE  Constant corresponding to singleInstance in the launchMode attribute.  0x00000003 
int  LAUNCH_SINGLE_TASK  Constant corresponding to singleTask in the launchMode attribute.  0x00000002 
int  LAUNCH_SINGLE_TOP  Constant corresponding to singleTop in the launchMode attribute.  0x00000001 
int  SCREEN_ORIENTATION_BEHIND  Constant corresponding to behind in the screenOrientation attribute.  0x00000003 
int  SCREEN_ORIENTATION_LANDSCAPE  Constant corresponding to landscape in the screenOrientation attribute.  0x00000000 
int  SCREEN_ORIENTATION_NOSENSOR  Constant corresponding to sensor in the screenOrientation attribute.  0x00000005 
int  SCREEN_ORIENTATION_PORTRAIT  Constant corresponding to portrait in the screenOrientation attribute.  0x00000001 
int  SCREEN_ORIENTATION_SENSOR  Constant corresponding to sensor in the screenOrientation attribute.  0x00000004 
int  SCREEN_ORIENTATION_UNSPECIFIED  Constant corresponding to unspecified in the screenOrientation attribute.  -1  0xffffffff 
int  SCREEN_ORIENTATION_USER  Constant corresponding to user in the screenOrientation attribute.  0x00000002 
Constants inherited from interface android.os.Parcelable

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: 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
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      int  screenOrientation  The preferred screen orientation this activity would like to run in. 
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. 
Fields inherited from class android.content.pm.ComponentInfo
Fields inherited from class android.content.pm.PackageItemInfo

Public Constructors

            ActivityInfo()
            ActivityInfo(ActivityInfo orig)

Public Methods

          int  describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
          void  dump(Printer pw, String prefix)
    final      int  getThemeResource()
Return the theme resource identifier to use for this activity.
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
          void  writeToParcel(Parcel dest, int parcelableFlags)
Methods inherited from class android.content.pm.ComponentInfo
Methods inherited from class android.content.pm.PackageItemInfo
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

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. This is not a core resource configutation, but a higher-level value, so its constant starts at the high bits.
Constant Value: 1073741824 (0x40000000)

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: 16 (0x00000010)

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: 32 (0x00000020)

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: 4 (0x00000004)

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 configChanges attribute.
Constant Value: 1 (0x00000001)

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 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: 64 (0x00000040)

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: 128 (0x00000080)

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: 8 (0x00000008)

public static final Creator<ActivityInfo> CREATOR

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 allowTaskReparenting attribute.
Constant Value: 64 (0x00000040)

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 alwaysRetainTaskState attribute.
Constant Value: 8 (0x00000008)

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 clearTaskOnLaunch attribute.
Constant Value: 4 (0x00000004)

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 excludeFromRecents attribute.
Constant Value: 32 (0x00000020)

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 finishOnTaskLaunch attribute.
Constant Value: 2 (0x00000002)

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 processName. Set from the multiprocess attribute.
Constant Value: 1 (0x00000001)

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 stateNotNeeded attribute.
Constant Value: 16 (0x00000010)

public static final int LAUNCH_MULTIPLE

Constant corresponding to multiple in the launchMode attribute.
Constant Value: 0 (0x00000000)

public static final int LAUNCH_SINGLE_INSTANCE

Constant corresponding to singleInstance in the launchMode attribute.
Constant Value: 3 (0x00000003)

public static final int LAUNCH_SINGLE_TASK

Constant corresponding to singleTask in the launchMode attribute.
Constant Value: 2 (0x00000002)

public static final int LAUNCH_SINGLE_TOP

Constant corresponding to singleTop in the launchMode attribute.
Constant Value: 1 (0x00000001)

public static final int SCREEN_ORIENTATION_BEHIND

Constant corresponding to behind in the screenOrientation attribute.
Constant Value: 3 (0x00000003)

public static final int SCREEN_ORIENTATION_LANDSCAPE

Constant corresponding to landscape in the screenOrientation attribute.
Constant Value: 0 (0x00000000)

public static final int SCREEN_ORIENTATION_NOSENSOR

Constant corresponding to sensor in the screenOrientation attribute.
Constant Value: 5 (0x00000005)

public static final int SCREEN_ORIENTATION_PORTRAIT

Constant corresponding to portrait in the screenOrientation attribute.
Constant Value: 1 (0x00000001)

public static final int SCREEN_ORIENTATION_SENSOR

Constant corresponding to sensor in the screenOrientation attribute.
Constant Value: 4 (0x00000004)

public static final int SCREEN_ORIENTATION_UNSPECIFIED

Constant corresponding to unspecified in the screenOrientation attribute.
Constant Value: -1 (0xffffffff)

public static final int SCREEN_ORIENTATION_USER

Constant corresponding to user in the screenOrientation attribute.
Constant Value: 2 (0x00000002)

Fields

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, and CONFIG_ORIENTATION. Set from the configChanges attribute.

public int launchMode

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.

public String permission

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

public int screenOrientation

public String targetActivity

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

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 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 ActivityInfo()

public ActivityInfo(ActivityInfo orig)

Public Methods

public int describeContents()

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

public void dump(Printer pw, String prefix)

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()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.

public void writeToParcel(Parcel dest, int parcelableFlags)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48