# RemoteAction

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# RemoteAction

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/RemoteAction "View this page in Java")  

```
class RemoteAction : Parcelable
```

|---|------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                       ||
| ↳ | [android.app.RemoteAction](https://developer.android.com/reference/kotlin/android/app/RemoteAction#) |

Represents a remote action that can be called from another process. The action can have an associated visualization including metadata like an icon or title.

## Summary

| Inherited constants ||
|---|---|
| From class[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#) |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) <br /> Descriptor bit used with[describeContents()](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. <br />                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) <br /> Flag for use with[writeToParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". Some implementations may want to release resources at this point. <br /> | ||

|                                                                                                                                                                                                                                                                                                                            Public constructors                                                                                                                                                                                                                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [RemoteAction](https://developer.android.com/reference/kotlin/android/app/RemoteAction#RemoteAction(android.graphics.drawable.Icon,%20kotlin.CharSequence,%20kotlin.CharSequence,%20android.app.PendingIntent))`(`icon:` `[Icon](https://developer.android.com/reference/kotlin/android/graphics/drawable/Icon.html#)`, `title:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`, `contentDescription:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`, `intent:` `[PendingIntent](https://developer.android.com/reference/kotlin/android/app/PendingIntent)`)` <br /> |

|                                                                                                                                                                                                           Public methods                                                                                                                                                                                                            ||
|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteAction](https://developer.android.com/reference/kotlin/android/app/RemoteAction#)!     | [clone](https://developer.android.com/reference/kotlin/android/app/RemoteAction#clone())`()` <br />                                                                                                                                                                                                                                  |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                    | [describeContents](https://developer.android.com/reference/kotlin/android/app/RemoteAction#describeContents())`()` <br />                                                                                                                                                                                                            |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                  | [dump](https://developer.android.com/reference/kotlin/android/app/RemoteAction#dump(kotlin.String,%20java.io.PrintWriter))`(`prefix:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `pw:` `[PrintWriter](https://developer.android.com/reference/kotlin/java/io/PrintWriter.html#)!`)` <br /> |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)            | [equals](https://developer.android.com/reference/kotlin/android/app/RemoteAction#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br />                                                                                                                                |
| [PendingIntent](https://developer.android.com/reference/kotlin/android/app/PendingIntent)     | [getActionIntent](https://developer.android.com/reference/kotlin/android/app/RemoteAction#getActionIntent())`()` Return the action intent.                                                                                                                                                                                           |
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | [getContentDescription](https://developer.android.com/reference/kotlin/android/app/RemoteAction#getContentDescription())`()` Return a content description representing the action.                                                                                                                                                   |
| [Icon](https://developer.android.com/reference/kotlin/android/graphics/drawable/Icon.html#)   | [getIcon](https://developer.android.com/reference/kotlin/android/app/RemoteAction#getIcon())`()` Return an icon representing the action.                                                                                                                                                                                             |
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | [getTitle](https://developer.android.com/reference/kotlin/android/app/RemoteAction#getTitle())`()` Return an title representing the action.                                                                                                                                                                                          |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                    | [hashCode](https://developer.android.com/reference/kotlin/android/app/RemoteAction#hashCode())`()` <br />                                                                                                                                                                                                                            |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)            | [isEnabled](https://developer.android.com/reference/kotlin/android/app/RemoteAction#isEnabled())`()` Return whether this action is enabled.                                                                                                                                                                                          |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                  | [setEnabled](https://developer.android.com/reference/kotlin/android/app/RemoteAction#setEnabled(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Sets whether this action is enabled.                                                                             |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                  | [setShouldShowIcon](https://developer.android.com/reference/kotlin/android/app/RemoteAction#setShouldShowIcon(kotlin.Boolean))`(`shouldShowIcon:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Sets whether the icon should be shown.                                                      |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)            | [shouldShowIcon](https://developer.android.com/reference/kotlin/android/app/RemoteAction#shouldShowIcon())`()` Return whether the icon should be shown.                                                                                                                                                                              |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                  | [writeToParcel](https://developer.android.com/reference/kotlin/android/app/RemoteAction#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`out:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />   |

|                                                                                                                                                                  Properties                                                                                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| static[Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[RemoteAction](https://developer.android.com/reference/kotlin/android/app/RemoteAction#)!\> | [CREATOR](https://developer.android.com/reference/kotlin/android/app/RemoteAction#CREATOR:android.os.Parcelable.Creator) <br /> |

## Public constructors

### RemoteAction

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
RemoteAction(
    icon: Icon, 
    title: CharSequence, 
    contentDescription: CharSequence, 
    intent: PendingIntent)
```

|                                                                   Parameters                                                                    ||
|----------------------|---------------------------------------------------------------------------------------------------------------------------|
| `icon`               | [Icon](https://developer.android.com/reference/kotlin/android/graphics/drawable/Icon.html#):This value cannot be`null`.   |
| `title`              | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html):This value cannot be`null`. |
| `contentDescription` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html):This value cannot be`null`. |
| `intent`             | [PendingIntent](https://developer.android.com/reference/kotlin/android/app/PendingIntent):This value cannot be`null`.     |

## Public methods

### clone

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun clone(): RemoteAction!
```

|                                                        Return                                                        ||
|-------------------------------------------------------------------------------------------|---------------------------|
| [RemoteAction](https://developer.android.com/reference/kotlin/android/app/RemoteAction#)! | a clone of this instance. |

|                                                                                                           Exceptions                                                                                                           ||
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java.lang.CloneNotSupportedException` | if the object's class does not support the`Cloneable`interface. Subclasses that override the`clone`method can also throw this exception to indicate that an instance cannot be cloned. |

### describeContents

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun describeContents(): Int
```

|                                                                                                                                                                               Return                                                                                                                                                                               ||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | 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](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) |

### dump

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun dump(
    prefix: String!, 
    pw: PrintWriter!
): Unit
```  

### equals

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun equals(other: Any?): Boolean
```

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getActionIntent

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getActionIntent(): PendingIntent
```

Return the action intent.

|                                                         Return                                                         ||
|-------------------------------------------------------------------------------------------|-----------------------------|
| [PendingIntent](https://developer.android.com/reference/kotlin/android/app/PendingIntent) | This value cannot be`null`. |

### getContentDescription

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getContentDescription(): CharSequence
```

Return a content description representing the action.

|                                                           Return                                                           ||
|-----------------------------------------------------------------------------------------------|-----------------------------|
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | This value cannot be`null`. |

### getIcon

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getIcon(): Icon
```

Return an icon representing the action.

|                                                          Return                                                          ||
|---------------------------------------------------------------------------------------------|-----------------------------|
| [Icon](https://developer.android.com/reference/kotlin/android/graphics/drawable/Icon.html#) | This value cannot be`null`. |

### getTitle

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getTitle(): CharSequence
```

Return an title representing the action.

|                                                           Return                                                           ||
|-----------------------------------------------------------------------------------------------|-----------------------------|
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | This value cannot be`null`. |

### hashCode

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |

### isEnabled

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun isEnabled(): Boolean
```

Return whether this action is enabled.  

### setEnabled

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setEnabled(enabled: Boolean): Unit
```

Sets whether this action is enabled.  

### setShouldShowIcon

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setShouldShowIcon(shouldShowIcon: Boolean): Unit
```

Sets whether the icon should be shown.  

### shouldShowIcon

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun shouldShowIcon(): Boolean
```

Return whether the icon should be shown.  

### writeToParcel

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun writeToParcel(
    out: Parcel, 
    flags: Int
): Unit
```

|                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                     ||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | The Parcel in which the object should be written. This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Additional flags about how the object should be written. May be 0 or[PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int). Value is either`0`or a combination of[android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |

## Properties

### CREATOR

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CREATOR: Parcelable.Creator<RemoteAction!>
```