public static class NotificationCompat.Action extends NotificationCompatBase.Action
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 NotificationCompat.Builder.addAction(int, CharSequence, PendingIntent)
or NotificationCompat.Builder.addAction(NotificationCompat.Action)
to attach actions.
Modifier and Type | Class and Description |
---|---|
static class |
NotificationCompat.Action.Builder
Builder class for
NotificationCompat.Action objects. |
static interface |
NotificationCompat.Action.Extender
Extender interface for use with
NotificationCompat.Builder.extend(android.support.v4.app.NotificationCompat.Extender) . |
static class |
NotificationCompat.Action.WearableExtender
Wearable extender for notification actions.
|
NotificationCompatBase.Action.Factory
Modifier and Type | Field and Description |
---|---|
PendingIntent |
actionIntent
Intent to send when the user invokes this action.
|
static NotificationCompatBase.Action.Factory |
FACTORY |
int |
icon
Small icon representing the action.
|
CharSequence |
title
Title of the action.
|
Constructor and Description |
---|
Action(int icon,
CharSequence title,
PendingIntent intent) |
Modifier and Type | Method and Description |
---|---|
PendingIntent |
getActionIntent() |
boolean |
getAllowGeneratedReplies()
Return whether the platform should automatically generate possible replies for this
NotificationCompat.Action |
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() |
public int icon
public CharSequence title
public PendingIntent actionIntent
public static final NotificationCompatBase.Action.Factory FACTORY
public Action(int icon, CharSequence title, PendingIntent intent)
public int getIcon()
getIcon
in class NotificationCompatBase.Action
public CharSequence getTitle()
getTitle
in class NotificationCompatBase.Action
public PendingIntent getActionIntent()
getActionIntent
in class NotificationCompatBase.Action
public Bundle getExtras()
getExtras
in class NotificationCompatBase.Action
public boolean getAllowGeneratedReplies()
NotificationCompat.Action
getAllowGeneratedReplies
in class NotificationCompatBase.Action
public RemoteInput[] getRemoteInputs()
getRemoteInputs
in class NotificationCompatBase.Action