InsightActionDetails.Builder


public static final class InsightActionDetails.Builder
extends Object

java.lang.Object
   ↳ android.app.personalcontext.insight.InsightActionDetails.Builder


Builder for InsightActionDetails. A valid InsightActionDetails requires at least one type of action to be set, either a PendingIntent, RemoteAction, or RemoteAppFunctionAction. The builder will throw an IllegalStateException if none is present when build() is invoked. Multiple actions can be set for a InsightActionDetails. The InsightActionDetails consumer may choose the action that best fits their usage in this case.

Summary

Public constructors

Builder()

Creates a new builder for the insight action details.

Public methods

InsightActionDetails build()

Builds the InsightActionDetails.

InsightActionDetails.Builder setPendingIntent(PendingIntent pendingIntent)

Sets the PendingIntent for the insight action details.

InsightActionDetails.Builder setRemoteAction(RemoteAction remoteAction)

Sets the RemoteAction for the insight action details.

InsightActionDetails.Builder setRemoteAppFunctionAction(RemoteAppFunctionAction remoteAppFunctionAction)

Sets the RemoteAppFunctionAction for the insight action details.

Inherited methods

Public constructors

Builder

Added in version 37.2
public Builder ()

Creates a new builder for the insight action details.

Public methods

build

Added in version 37.2
public InsightActionDetails build ()

Builds the InsightActionDetails.

Returns
InsightActionDetails the InsightActionDetails.
This value cannot be null.

setPendingIntent

Added in version 37.2
public InsightActionDetails.Builder setPendingIntent (PendingIntent pendingIntent)

Sets the PendingIntent for the insight action details.

Parameters
pendingIntent PendingIntent: the PendingIntent to set.
This value cannot be null.

Returns
InsightActionDetails.Builder This value cannot be null.

setRemoteAction

Added in version 37.2
public InsightActionDetails.Builder setRemoteAction (RemoteAction remoteAction)

Sets the RemoteAction for the insight action details.

Parameters
remoteAction RemoteAction: the RemoteAction to set.
This value cannot be null.

Returns
InsightActionDetails.Builder This value cannot be null.

setRemoteAppFunctionAction

Added in version 37.2
public InsightActionDetails.Builder setRemoteAppFunctionAction (RemoteAppFunctionAction remoteAppFunctionAction)

Sets the RemoteAppFunctionAction for the insight action details.

Parameters
remoteAppFunctionAction RemoteAppFunctionAction: the RemoteAppFunctionAction to set.
This value cannot be null.

Returns
InsightActionDetails.Builder This value cannot be null.