public static class

WearableNotifications.Action.Builder

extends Object
java.lang.Object
   ↳ android.preview.support.wearable.notifications.WearableNotifications.Action.Builder

Class Overview

Builder class for WearableNotifications.Action objects.

Summary

Public Constructors
WearableNotifications.Action.Builder(int icon, CharSequence title, PendingIntent intent)
Construct a new builder for WearableNotifications.Action object.
Public Methods
WearableNotifications.Action.Builder addRemoteInput(RemoteInput remoteInput)
Add an input to be collected from the user when this action is sent.
WearableNotifications.Action build()
Combine all of the options that have been set and return a new WearableNotifications.Action object.
Bundle getExtras()
Get the current metadata Bundle used by this Builder, creating a new one as necessary.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Construct a new builder for WearableNotifications.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 Methods

public WearableNotifications.Action.Builder addRemoteInput (RemoteInput remoteInput)

Add an input to be collected from the user when this action is sent. Response values are sent as extras to this action's pending intent when sent.

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

public WearableNotifications.Action build ()

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

Returns
  • the built action

public Bundle getExtras ()

Get the current metadata Bundle used by this Builder, creating a new one as necessary.

The returned Bundle is shared with this Builder.