# NotificationCompat.Action

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationCompat.java+class:androidx.core.app.NotificationCompat.Action) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
class NotificationCompat.Action
```

<br />

*** ** * ** ***

Structure to encapsulate a named action that can be shown as part of this notification. It must include an icon, a label, and a `https://developer.android.com/reference/android/app/PendingIntent.html` to be fired when the action is selected by the user. Action buttons won't appear on platforms prior to Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#JELLY_BEAN`.

As of Android `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#N`, action button icons will not be displayed on action buttons, but are still required and are available to `https://developer.android.com/reference/android/service/notification/NotificationListenerService.html`, which may display them in other contexts, for example on a wearable device.

Apps should use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder#addAction(int,java.lang.CharSequence,android.app.PendingIntent)` or `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder#addAction(androidx.core.app.NotificationCompat.Action)` to attach actions.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.Builder` Builder class for `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action` objects. |
| `interface https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.Extender` Extender interface for use with `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.Builder#extend(androidx.core.app.NotificationCompat.Action.Extender)`. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) annotation https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction` Provides meaning to an `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action` that hints at what the associated `https://developer.android.com/reference/android/app/PendingIntent.html` will do. |
| `class https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.WearableExtender : https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.Extender` Wearable extender for notification actions. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#EMPHASIS_AUTO() = 0` The action's visual emphasis is generally the default, or may be automatically determined by the system based on context. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#EMPHASIS_PRIMARY() = 1` The action's visual emphasis may indicate that this action is more important than others. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#EMPHASIS_SECONDARY() = 2` The action's visual emphasis may indicate that this action is less important than others. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_ARCHIVE() = 5` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Archive the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_CALL() = 10` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Call a contact, group, etc. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_DELETE() = 4` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Delete the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_MARK_AS_READ() = 2` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content as read. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_MARK_AS_UNREAD() = 3` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content as unread. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_MUTE() = 6` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mute the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_NONE() = 0` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: No semantic action defined. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_PAUSE() = 14` `SemanticAction`: Pause the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_PLAY() = 13` `SemanticAction`: Start (or continue previously paused) content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_REPLY() = 1` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Reply to a conversation, chat, group, or wherever replies may be appropriate. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_STOP() = 15` `SemanticAction`: Stop the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_THUMBS_DOWN() = 9` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content with a thumbs down. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_THUMBS_UP() = 8` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content with a thumbs up. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_UNMUTE() = 7` `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Unmute the content associated with the notification. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#STYLE_AUTO() = 0` The action can be presented with the best form for the content and context. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#STYLE_ICON_AND_TEXT() = 2` The action is best represented by a combo of the icon and text. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#STYLE_ICON_ONLY() = 3` The action is best represented by only its icon. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#STYLE_TEXT_ONLY() = 1` The action is best represented by only the text (its `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#title()`). |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#Action(androidx.core.graphics.drawable.IconCompat,java.lang.CharSequence,android.app.PendingIntent)(icon: https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat?, title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?, intent: https://developer.android.com/reference/android/app/PendingIntent.html?)` **Note:** For devices running an Android version strictly lower than API level 23 this constructor only supports resource-ID based IconCompat objects. |
| `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#Action(int,java.lang.CharSequence,android.app.PendingIntent)(icon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?, intent: https://developer.android.com/reference/android/app/PendingIntent.html?)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent.html?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getActionIntent()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getAllowGeneratedReplies()()` Return whether the platform should automatically generate possible replies for this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput!>?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getDataOnlyRemoteInputs()()` Get the list of inputs to be collected from the user that ONLY accept data when this action is sent. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getEmphasisHint()()` Returns the app's hint about the importance of this action relative to others in this notification. |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getExtras()()` Get additional metadata carried around with this Action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[getIcon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIcon())()` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIconCompat()` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/IconCompat?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIconCompat()()` Return the icon associated with this Action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput!>?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getRemoteInputs()()` Get the list of inputs to be collected from the user when this action is sent. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getSemanticAction()()` Returns the `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction` associated with this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getShowsUserInterface()()` Return whether or not triggering this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`'s `https://developer.android.com/reference/android/app/PendingIntent.html` will open a user interface. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getStyleHint()()` Returns the app's hint about the preferred visual style of this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getTitle()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#isAuthenticationRequired()()` Returns whether the OS should only send this action's `https://developer.android.com/reference/android/app/PendingIntent.html` on an unlocked device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#isContextual()()` Returns whether this is a contextual Action, i.e. whether the action is dependent on the notification message body. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/app/PendingIntent.html?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#actionIntent()` Intent to send when the user invokes this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#icon()` **This property is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIconCompat()` instead. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#title()` Title of the action. |

## Constants

### EMPHASIS_AUTO

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val EMPHASIS_AUTO = 0: Int
```

The action's visual emphasis is generally the default, or may be automatically determined by the system based on context.

### EMPHASIS_PRIMARY

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val EMPHASIS_PRIMARY = 1: Int
```

The action's visual emphasis may indicate that this action is more important than others.

### EMPHASIS_SECONDARY

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val EMPHASIS_SECONDARY = 2: Int
```

The action's visual emphasis may indicate that this action is less important than others.

### SEMANTIC_ACTION_ARCHIVE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_ARCHIVE = 5: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Archive the content associated with the notification. This could mean archiving an email, message, etc.

### SEMANTIC_ACTION_CALL

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_CALL = 10: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Call a contact, group, etc.

### SEMANTIC_ACTION_DELETE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_DELETE = 4: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Delete the content associated with the notification. This could mean deleting an email, message, etc.

### SEMANTIC_ACTION_MARK_AS_READ

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_MARK_AS_READ = 2: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content as read.

### SEMANTIC_ACTION_MARK_AS_UNREAD

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_MARK_AS_UNREAD = 3: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content as unread.

### SEMANTIC_ACTION_MUTE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_MUTE = 6: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mute the content associated with the notification. This could mean silencing a conversation or currently playing media.

### SEMANTIC_ACTION_NONE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_NONE = 0: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: No semantic action defined.

### SEMANTIC_ACTION_PAUSE

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val SEMANTIC_ACTION_PAUSE = 14: Int
```

`SemanticAction`: Pause the content associated with the notification. This could mean pausing media playback, pausing a running timer, etc.

### SEMANTIC_ACTION_PLAY

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val SEMANTIC_ACTION_PLAY = 13: Int
```

`SemanticAction`: Start (or continue previously paused) content associated with the notification. This could mean starting media playback, resuming a paused timer, etc.

### SEMANTIC_ACTION_REPLY

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_REPLY = 1: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Reply to a conversation, chat, group, or wherever replies may be appropriate.

### SEMANTIC_ACTION_STOP

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val SEMANTIC_ACTION_STOP = 15: Int
```

`SemanticAction`: Stop the content associated with the notification. This could mean stopping media playback, resetting a timer, etc. It is implied that a follow-up `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#SEMANTIC_ACTION_PLAY()` would restart from the beginning, or may not be offered at all.

### SEMANTIC_ACTION_THUMBS_DOWN

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_THUMBS_DOWN = 9: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content with a thumbs down.

### SEMANTIC_ACTION_THUMBS_UP

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_THUMBS_UP = 8: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Mark content with a thumbs up.

### SEMANTIC_ACTION_UNMUTE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
const val SEMANTIC_ACTION_UNMUTE = 7: Int
```

`https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction`: Unmute the content associated with the notification. This could mean un-silencing a conversation or currently playing media.

### STYLE_AUTO

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val STYLE_AUTO = 0: Int
```

The action can be presented with the best form for the content and context.

### STYLE_ICON_AND_TEXT

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val STYLE_ICON_AND_TEXT = 2: Int
```

The action is best represented by a combo of the icon and text.

### STYLE_ICON_ONLY

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val STYLE_ICON_ONLY = 3: Int
```

The action is best represented by only its icon.

### STYLE_TEXT_ONLY

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
const val STYLE_TEXT_ONLY = 1: Int
```

The action is best represented by only the text (its `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#title()`).

## Public constructors

### Action

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
Action(icon: IconCompat?, title: CharSequence?, intent: PendingIntent?)
```

**Note:** For devices running an Android version strictly lower than API level 23 this constructor only supports resource-ID based IconCompat objects.

### Action

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
Action(icon: Int, title: CharSequence?, intent: PendingIntent?)
```

## Public functions

### getActionIntent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

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

### getAllowGeneratedReplies

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun getAllowGeneratedReplies(): Boolean
```

Return whether the platform should automatically generate possible replies for this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`

### getDataOnlyRemoteInputs

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun getDataOnlyRemoteInputs(): Array<RemoteInput!>?
```

Get the list of inputs to be collected from the user that ONLY accept data when this action is sent. These remote inputs are guaranteed to return true on a call to `https://developer.android.com/reference/kotlin/androidx/core/app/RemoteInput#isDataOnly()`.

May return null if no data-only remote inputs were added.

This method exists so that legacy RemoteInput collectors that pre-date the addition of non-textual RemoteInputs do not access these remote inputs.

### getEmphasisHint

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
fun getEmphasisHint(): Int
```

Returns the app's hint about the importance of this action relative to others in this notification.

### getExtras

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun getExtras(): Bundle
```

Get additional metadata carried around with this Action.

### getIcon

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
fun [getIcon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIcon())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIconCompat()` instead.

### getIconCompat

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
fun getIconCompat(): IconCompat?
```

Return the icon associated with this Action.

### getRemoteInputs

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun getRemoteInputs(): Array<RemoteInput!>?
```

Get the list of inputs to be collected from the user when this action is sent. May return null if no remote inputs were added. Only returns inputs which accept a text input. For inputs which only accept data use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getDataOnlyRemoteInputs()`.

### getSemanticAction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@NotificationCompat.Action.SemanticAction
fun getSemanticAction(): Int
```

Returns the `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction` associated with this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`. A `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction` denotes what an `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`'s `https://developer.android.com/reference/android/app/PendingIntent.html` will do (eg. reply, mark as read, delete, etc).

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action.SemanticAction` |   |

### getShowsUserInterface

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun getShowsUserInterface(): Boolean
```

Return whether or not triggering this `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action`'s `https://developer.android.com/reference/android/app/PendingIntent.html` will open a user interface.

### getStyleHint

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
fun getStyleHint(): Int
```

Returns the app's hint about the preferred visual style of this action.

### getTitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

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

### isAuthenticationRequired

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
fun isAuthenticationRequired(): Boolean
```

Returns whether the OS should only send this action's `https://developer.android.com/reference/android/app/PendingIntent.html` on an unlocked device. If the device is locked when the action is invoked, the OS should show the keyguard and require successful authentication before invoking the intent.

### isContextual

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
fun isContextual(): Boolean
```

Returns whether this is a contextual Action, i.e. whether the action is dependent on the notification message body. An example of a contextual action could be an action opening a map application with an address shown in the notification.

## Public properties

### actionIntent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val actionIntent: PendingIntent?
```

Intent to send when the user invokes this action. May be null, in which case the action may be rendered in a disabled presentation.

### icon

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
val icon: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Action#getIconCompat()` instead.

Small icon representing the action.

### title

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val title: CharSequence?
```

Title of the action.