added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

NotificationCompat.Action

public static class NotificationCompat.Action
extends Object

java.lang.Object
   ↳ android.support.v4.app.NotificationCompat.Action


Structure to encapsulate a named action that can be shown as part of this notification. It must include an icon, a label, and a PendingIntent to be fired when the action is selected by the user. Action buttons won't appear on platforms prior to Android 4.1.

Apps should use addAction(int, CharSequence, PendingIntent) or addAction(NotificationCompat.Action) to attach actions.

Summary

Nested classes

class NotificationCompat.Action.Builder

Builder class for NotificationCompat.Action objects. 

interface NotificationCompat.Action.Extender

Extender interface for use with extend(NotificationCompat.Extender)

@interface NotificationCompat.Action.SemanticAction

Provides meaning to an NotificationCompat.Action that hints at what the associated PendingIntent will do. 

class NotificationCompat.Action.WearableExtender

Wearable extender for notification actions. 

Constants

int SEMANTIC_ACTION_ARCHIVE

NotificationCompat.Action.SemanticAction: Archive the content associated with the notification.

int SEMANTIC_ACTION_CALL

NotificationCompat.Action.SemanticAction: Call a contact, group, etc.

int SEMANTIC_ACTION_DELETE

NotificationCompat.Action.SemanticAction: Delete the content associated with the notification.

int SEMANTIC_ACTION_MARK_AS_READ

NotificationCompat.Action.SemanticAction: Mark content as read.

int SEMANTIC_ACTION_MARK_AS_UNREAD

NotificationCompat.Action.SemanticAction: Mark content as unread.

int SEMANTIC_ACTION_MUTE

NotificationCompat.Action.SemanticAction: Mute the content associated with the notification.

int SEMANTIC_ACTION_NONE

NotificationCompat.Action.SemanticAction: No semantic action defined.

int SEMANTIC_ACTION_REPLY

NotificationCompat.Action.SemanticAction: Reply to a conversation, chat, group, or wherever replies may be appropriate.

int SEMANTIC_ACTION_THUMBS_DOWN

NotificationCompat.Action.SemanticAction: Mark content with a thumbs down.

int SEMANTIC_ACTION_THUMBS_UP

NotificationCompat.Action.SemanticAction: Mark content with a thumbs up.

int SEMANTIC_ACTION_UNMUTE

NotificationCompat.Action.SemanticAction: Unmute the content associated with the notification.

Fields

public PendingIntent actionIntent

Intent to send when the user invokes this action.