public static final class Notification.Action.Builder extends Object
Notification.Action
objects.Constructor and Description |
---|
Builder(Icon icon,
CharSequence title,
PendingIntent intent)
Construct a new builder for
Notification.Action object. |
Builder(int icon,
CharSequence title,
PendingIntent intent)
Deprecated.
|
Builder(Notification.Action action)
Construct a new builder for
Notification.Action object using the fields from an
Notification.Action . |
Modifier and Type | Method and Description |
---|---|
Notification.Action.Builder |
addExtras(Bundle extras)
Merge additional metadata into this builder.
|
Notification.Action.Builder |
addRemoteInput(RemoteInput remoteInput)
Add an input to be collected from the user when this action is sent.
|
Notification.Action |
build()
Combine all of the options that have been set and return a new
Notification.Action
object. |
Notification.Action.Builder |
extend(Notification.Action.Extender extender)
Apply an extender to this action builder.
|
Bundle |
getExtras()
Get the metadata Bundle used by this Builder.
|
Notification.Action.Builder |
setAllowGeneratedReplies(boolean allowGeneratedReplies)
Set whether the platform should automatically generate possible replies to add to
RemoteInput.getChoices() . |
@Deprecated public Builder(int icon, CharSequence title, PendingIntent intent)
Notification.Action
object.icon
- icon to show for this actiontitle
- the title of the actionintent
- the PendingIntent
to fire when users trigger this actionpublic Builder(Icon icon, CharSequence title, PendingIntent intent)
Notification.Action
object.icon
- icon to show for this actiontitle
- the title of the actionintent
- the PendingIntent
to fire when users trigger this actionpublic Builder(Notification.Action action)
Notification.Action
object using the fields from an
Notification.Action
.action
- the action to read fields from.public Notification.Action.Builder addExtras(Bundle extras)
Values within the Bundle will replace existing extras values in this Builder.
Notification.extras
public Bundle getExtras()
The returned Bundle is shared with this Builder.
public Notification.Action.Builder addRemoteInput(RemoteInput remoteInput)
RemoteInput.getResultsFromIntent(android.content.Intent)
function.remoteInput
- a RemoteInput
to add to the actionpublic Notification.Action.Builder setAllowGeneratedReplies(boolean allowGeneratedReplies)
RemoteInput.getChoices()
. If the Notification.Action
doesn't have a
RemoteInput
, this has no effect.allowGeneratedReplies
- true
to allow generated replies, false
otherwisefalse
public Notification.Action.Builder extend(Notification.Action.Extender extender)
public Notification.Action build()
Notification.Action
object.