Android APIs
public static final class

NotificationCompat.Action.Builder

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

Class Overview

Builder class for NotificationCompat.Action objects.

Summary

Public Constructors
NotificationCompat.Action.Builder(int icon, CharSequence title, PendingIntent intent)
Construct a new builder for NotificationCompat.Action object.
NotificationCompat.Action.Builder(NotificationCompat.Action action)
Construct a new builder for NotificationCompat.Action object using the fields from an NotificationCompat.Action.
Public Methods
NotificationCompat.Action.Builder addExtras(Bundle extras)
Merge additional metadata into this builder.
NotificationCompat.Action.Builder addRemoteInput(RemoteInput remoteInput)
Add an input to be collected from the user when this action is sent.
NotificationCompat.Action build()
Combine all of the options that have been set and return a new NotificationCompat.Action object.
NotificationCompat.Action.Builder extend(NotificationCompat.Action.Extender extender)
Apply an extender to this action builder.
Bundle getExtras()
Get the metadata Bundle used by this Builder.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Construct a new builder for NotificationCompat.Action object.

Parameters
icon icon to show for this action
title the title of the action
intent the PendingIntent to fire when users trigger this action

public NotificationCompat.Action.Builder (NotificationCompat.Action action)

Construct a new builder for NotificationCompat.Action object using the fields from an NotificationCompat.Action.

Parameters
action the action to read fields from.

Public Methods

public NotificationCompat.Action.Builder addExtras (Bundle extras)

Merge additional metadata into this builder.

Values within the Bundle will replace existing extras values in this Builder.

See Also

public NotificationCompat.Action.Builder addRemoteInput (RemoteInput remoteInput)

Add an input to be collected from the user when this action is sent. Response values can be retrieved from the fired intent by using the getResultsFromIntent(Intent) function.

Parameters
remoteInput a RemoteInput to add to the action
Returns
  • this object for method chaining

public NotificationCompat.Action build ()

Combine all of the options that have been set and return a new NotificationCompat.Action object.

Returns
  • the built action

public NotificationCompat.Action.Builder extend (NotificationCompat.Action.Extender extender)

Apply an extender to this action builder. Extenders may be used to add metadata or change options on this builder.

public Bundle getExtras ()

Get the metadata Bundle used by this Builder.

The returned Bundle is shared with this Builder.