Android APIs
public static class

NotificationCompat.Action

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

Class Overview

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)
class NotificationCompat.Action.WearableExtender Wearable extender for notification actions. 
Fields
public PendingIntent actionIntent Intent to send when the user invokes this action.
public int icon Small icon representing the action.
public CharSequence title Title of the action.
Public Constructors
NotificationCompat.Action(int icon, CharSequence title, PendingIntent intent)
Public Methods
PendingIntent getActionIntent()
Bundle getExtras()
Get additional metadata carried around with this Action.
int getIcon()
RemoteInput[] getRemoteInputs()
Get the list of inputs to be collected from the user when this action is sent.
CharSequence getTitle()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public PendingIntent actionIntent

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

public int icon

Small icon representing the action.

public CharSequence title

Title of the action.

Public Constructors

public NotificationCompat.Action (int icon, CharSequence title, PendingIntent intent)

Parameters
icon
title
intent

Public Methods

public PendingIntent getActionIntent ()

Returns
PendingIntent

public Bundle getExtras ()

Get additional metadata carried around with this Action.

Returns
Bundle

public int getIcon ()

Returns
int

public RemoteInput[] getRemoteInputs ()

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.

Returns
RemoteInput[]

public CharSequence getTitle ()

Returns
CharSequence