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 PotentialAction.Builder

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

@NonNull PotentialAction.Builder

Sets the name of the action.

@NonNull PotentialAction.Builder

Sets the deeplink URI of the Action.

Public constructors

Builder

Added in 1.1.0-alpha07
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-alpha07
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-alpha07
public @NonNull PotentialAction build()

Builds the PotentialAction.

setDescription

Added in 1.1.0-alpha07
public @NonNull PotentialAction.Builder setDescription(@Nullable String description)

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

setName

Added in 1.1.0-alpha07
public @NonNull PotentialAction.Builder setName(@Nullable String name)

Sets the name of the action.

setUri

Added in 1.1.0-alpha07
public @NonNull PotentialAction.Builder setUri(@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.