Android.App.ActivityManager.GetRecentTasks Method

Syntax

[Android.Runtime.Register("getRecentTasks", "(II)Ljava/util/List;", "GetGetRecentTasks_IIHandler")]
[System.Obsolete("deprecated")]
public virtual IList<ActivityManager.RecentTaskInfo> GetRecentTasks (int maxNum, [Android.Runtime.GeneratedEnum] RecentTaskFlags flags)

Parameters

maxNum
The maximum number of entries to return in the list. The actual number returned may be smaller, depending on how many tasks the user has started and the maximum number the system can remember.
flags
Information about what to return. May be any combination of ActivityManager.RECENT_WITH_EXCLUDED and ActivityManager.RECENT_IGNORE_UNAVAILABLE.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.SecurityException

Remarks

Return a list of the tasks that the user has recently launched, with the most recent being first and older ones after in order.

Note: this method is only intended for debugging and presenting task management user interfaces. This should never be used for core logic in an application, such as deciding between different behaviors based on the information found here. Such uses are not supported, and will likely break in the future. For example, if multiple applications can be actively running at the same time, assumptions made about the meaning of the data here for purposes of control flow will be incorrect.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1