Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ActivityManager.RecentTaskInfo

public static class ActivityManager.RecentTaskInfo
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.ActivityManager.RecentTaskInfo


Information you can retrieve about tasks that the user has most recently started or visited.

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<ActivityManager.RecentTaskInfo> CREATOR

public int affiliatedTaskId

Task affiliation for grouping with other tasks.

public ComponentName baseActivity

The component launched as the first activity in the task.

public Intent baseIntent

The original Intent used to launch the task.

public CharSequence description

Description of the task's last state.

public int id

If this task is currently running, this is the identifier for it.

public int numActivities

Number of activities in this task.

public ComponentName origActivity

If this task was started from an alias, this is the actual activity component that was initially started; the component of the baseIntent in this case is the name of the actual activity implementation that the alias referred to.

public int persistentId

The true identifier of this task, valid even if it is not running.

public ActivityManager.TaskDescription taskDescription

The recent activity values for the highest activity in the stack to have set the values.

public ComponentName topActivity

The activity component at the top of the history stack of the task.

Public constructors

ActivityManager.RecentTaskInfo()

Public methods

int describeContents()

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

void readFromParcel(Parcel source)
void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

affiliatedTaskId

Added in API level 21
int affiliatedTaskId

Task affiliation for grouping with other tasks.

baseActivity

Added in API level 23
ComponentName baseActivity

The component launched as the first activity in the task. This can be considered the "application" of this task.

baseIntent

Added in API level 1
Intent baseIntent

The original Intent used to launch the task. You can use this Intent to re-launch the task (if it is no longer running) or bring the current task to the front.

description

Added in API level 11
CharSequence description

Description of the task's last state.

id

Added in API level 1
int id

If this task is currently running, this is the identifier for it. If it is not running, this will be -1.

numActivities

Added in API level 23
int numActivities

Number of activities in this task.

origActivity

Added in API level 1
ComponentName origActivity

If this task was started from an alias, this is the actual activity component that was initially started; the component of the baseIntent in this case is the name of the actual activity implementation that the alias referred to. Otherwise, this is null.

persistentId

Added in API level 12
int persistentId

The true identifier of this task, valid even if it is not running.

taskDescription

Added in API level 21
ActivityManager.TaskDescription taskDescription

The recent activity values for the highest activity in the stack to have set the values. setTaskDescription(android.app.ActivityManager.TaskDescription).

topActivity

Added in API level 23
ComponentName topActivity

The activity component at the top of the history stack of the task. This is what the user is currently doing.

Public constructors

ActivityManager.RecentTaskInfo

Added in API level 1
ActivityManager.RecentTaskInfo ()

Public methods

describeContents

Added in API level 1
int describeContents ()

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

Returns
int a bitmask indicating the set of special object types marshalled by the Parcelable.

readFromParcel

Added in API level 1
void readFromParcel (Parcel source)

Parameters
source Parcel

writeToParcel

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

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.