PotentialAction.Builder


public final class PotentialAction.Builder


Builder for PotentialAction.

Summary

Public constructors

Constructor for PotentialAction.Builder.

Builder(@NonNull PotentialAction potentialAction)

Constructor with all the existing values.

Public methods

@NonNull PotentialAction

Builds the PotentialAction.

@NonNull T

Sets the description of the action, such as "Call".

@NonNull T

Sets the name of the action.

@NonNull T

Sets the deeplink URI of the Action.

Protected fields

mDescription

protected @Nullable String mDescription

mName

protected @Nullable String mName

mUri

protected @Nullable String mUri

Public constructors

Builder

Added in 1.1.0
public Builder()

Constructor for PotentialAction.Builder.

As PotentialAction is used as a DocumentProperty of Thing, it does not need an id or namespace.

Builder

Added in 1.1.0
public Builder(@NonNull PotentialAction potentialAction)

Constructor with all the existing values.

As PotentialAction is used as a DocumentProperty of Thing, it does not need an id or namespace.

Public methods

build

Added in 1.1.0
public @NonNull PotentialAction build()

Builds the PotentialAction.

setDescription

Added in 1.1.0
public @NonNullsetDescription(@Nullable String description)

Sets the description of the action, such as "Call".

setName

Added in 1.1.0
public @NonNullsetName(@Nullable String name)

Sets the name of the action.

setUri

Added in 1.1.0
public @NonNullsetUri(@Nullable String uri)

Sets the deeplink URI of the Action.

A deeplink URI is a URI that lets a user access a specific content or feature within an app directly. Users can create one by adding parameters to the app's base URI. To use a deeplink URI in an Android application, users can create an android.content.Intent object by calling parseUri with the deeplink URI. Creating a deeplink URI, and adding intent extras, can be done by building an intent and calling toUri.