NotificationCompat.Action.Builder

public final class NotificationCompat.Action.Builder


Builder class for Action objects.

Summary

Public constructors

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

Builder(
    @Nullable IconCompat icon,
    @Nullable CharSequence title,
    @Nullable PendingIntent intent
)

Construct a new builder for Action object.

Builder(
    int icon,
    @Nullable CharSequence title,
    @Nullable PendingIntent intent
)

Construct a new builder for Action object.

Public methods

@NonNull NotificationCompat.Action.Builder

Merge additional metadata into this builder.

@NonNull NotificationCompat.Action.Builder

Add an input to be collected from the user when this action is sent.

@NonNull NotificationCompat.Action

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

@NonNull NotificationCompat.Action.Builder

Apply an extender to this action builder.

@NonNull Bundle

Get the metadata Bundle used by this Builder.

@NonNull NotificationCompat.Action.Builder
setAllowGeneratedReplies(boolean allowGeneratedReplies)

Set whether the platform should automatically generate possible replies to add to getChoices.

@NonNull NotificationCompat.Action.Builder
setAuthenticationRequired(boolean authenticationRequired)

From API 31, sets whether the OS should only send this action's PendingIntent on an unlocked device.

@NonNull NotificationCompat.Action.Builder
setContextual(boolean isContextual)

Sets whether this Action is a contextual action, i.e.

@NonNull NotificationCompat.Action.Builder