Action.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# Action.Builder

extends Thing.Builder

java.lang.Object
↳ | com.google.android.gms.appindexing.Thing.Builder
| ↳ | com.google.android.gms.appindexing.Action.Builder

## Class Overview

Create a builder for an `Action`.

## Summary

Public Constructors
| Action.Builder(String actionType)

Public Methods
Action | build() Build the `Action` object.
Action.Builder | put(String key, Thing value) Sets a property of the action.
Action.Builder | put(String key, String value) Sets a property of the action.
Action.Builder | setActionStatus(String actionStatusType) Specify the status of the action.
Action.Builder | setName(String name) Sets the name of the action.
Action.Builder | setObject(Thing thing) Sets the object of the action.
Action.Builder | setUrl(Uri url) Sets the app URI of the action.

[Expand] Inherited Methods
From class com.google.android.gms.appindexing.Thing.Builder
Thing | build() Build the `Thing` object.
Thing.Builder | put(String key, Thing value) Sets a property of the content.
Thing.Builder | put(String key, String value) Sets a property of the content.
Thing.Builder | setDescription(String description) Sets the optional description of the content.
Thing.Builder | setId(String id) Sets the optional web URL of the content.
Thing.Builder | setName(String name) Sets the name of the content.
Thing.Builder | setType(String type) Sets the schema.org type of the content.
Thing.Builder | setUrl(Uri url) Sets the app URI of the content.
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public Action.Builder (String actionType)

## Public Methods

#### public Action build ()

Build the `Action` object.

#### public Action.Builder put (String key, Thing value)

Sets a property of the action.

##### Parameters

key | The schema.org property. Must not be null.
value | The value of the schema.org property represented as a `Thing`. If null, the value will be ignored.

#### public Action.Builder put (String key, String value)

Sets a property of the action.

##### Parameters

key | The schema.org property. Must not be null.
value | The value of the schema.org property. If null, the value will be ignored.

#### public Action.Builder setActionStatus (String actionStatusType)

Specify the status of the action.

#### public Action.Builder setName (String name)

Sets the name of the action.

##### Parameters

name | The name of the action.

#### public Action.Builder setObject (Thing thing)

Sets the object of the action.

##### Parameters

thing | The object of the action. Must not be null.

#### public Action.Builder setUrl (Uri url)

Sets the app URI of the action.

##### Parameters

url | The app URI of the action in the App Indexing format.