Google is committed to advancing racial equity for Black communities. See how.
Added in API level 21

TaskDescription

open class TaskDescription : Parcelable
kotlin.Any
   ↳ android.app.ActivityManager.TaskDescription

Information you can set and retrieve about the current activity within the recent task list.

Summary

Inherited constants

Public constructors

<init>(label: String!, iconRes: Int, colorPrimary: Int)

Creates the TaskDescription to the specified values.

<init>(label: String!, iconRes: Int)

Creates the TaskDescription to the specified values.

<init>(label: String!)

Creates the TaskDescription to the specified values.

Creates an empty TaskDescription.

<init>(label: String!, icon: Bitmap!, colorPrimary: Int)

Creates the TaskDescription to the specified values.

<init>(label: String!, icon: Bitmap!)

Creates the TaskDescription to the specified values.

Creates a copy of another TaskDescription.

Public methods

open Int

open Boolean
equals(other: Any?)

open Bitmap!

open String!

open Int

open Unit

open String

open Unit
writeToParcel(dest: Parcel!, flags: Int)

Properties

static Parcelable.Creator<ActivityManager.TaskDescription!>

Public constructors

<init>

Added in API level 28
TaskDescription(
    label: String!,
    iconRes: Int,
    colorPrimary: Int)

Creates the TaskDescription to the specified values.

Parameters
label String!: A label and description of the current state of this task.
iconRes Int: A drawable resource of an icon that represents the current state of this activity.
colorPrimary Int: A color to override the theme's primary color. This color must be opaque.

<init>

Added in API level 28
TaskDescription(
    label: String!,
    iconRes: Int)

Creates the TaskDescription to the specified values.

Parameters
label String!: A label and description of the current state of this activity.
iconRes Int: A drawable resource of an icon that represents the current state of this activity.

<init>

Added in API level 21
TaskDescription(label: String!)

Creates the TaskDescription to the specified values.

Parameters
label String!: A label and description of the current state of this activity.

<init>

Added in API level 21
TaskDescription()

Creates an empty TaskDescription.

<init>

Added in API level 21
TaskDescription(
    label: String!,
    icon: Bitmap!,
    colorPrimary: Int)

Deprecated: use TaskDescription constructor with icon resource instead

Creates the TaskDescription to the specified values.

Parameters
label String!: A label and description of the current state of this task.
icon Bitmap!: An icon that represents the current state of this task.
colorPrimary Int: A color to override the theme's primary color. This color must be opaque.

<init>

Added in API level 21
TaskDescription(
    label: String!,
    icon: Bitmap!)

Deprecated: use TaskDescription constructor with icon resource instead

Creates the TaskDescription to the specified values.

Parameters
label String!: A label and description of the current state of this activity.
icon Bitmap!: An icon that represents the current state of this activity.

<init>

Added in API level 21
TaskDescription(td: ActivityManager.TaskDescription!)

Creates a copy of another TaskDescription.

Public methods

describeContents

Added in API level 21
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 21
open fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getIcon

Added in API level 21
Deprecated in API level 30
open fun getIcon(): Bitmap!

Deprecated: This call is no longer supported. The caller should keep track of any icons it sets for the task descriptions internally.

Return
Bitmap! The in-memory or loaded icon that represents the current state of this task.

getLabel

Added in API level 21
open fun getLabel(): String!
Return
String! The label and description of the current state of this task.

getPrimaryColor

Added in API level 21
open fun getPrimaryColor(): Int
Return
Int The color override on the theme's primary color.

readFromParcel

Added in API level 21
open fun readFromParcel(source: Parcel!): Unit

toString

Added in API level 21
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 21
open fun writeToParcel(
    dest: Parcel!,
    flags: Int
): Unit
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. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 21
static val CREATOR: Parcelable.Creator<ActivityManager.TaskDescription!>