public final class

Action

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

Class Overview

Represents an action performed by a user.

To use this API, add the following to your Activity:

 Action action = Action.newAction(actionType, title, objectUrl);
 AppIndex.AppIndexApi.action(mGoogleApiClient, action);
 

Summary

Nested Classes
class Action.Builder Create a builder for an Action
Constants
String TYPE_ADD The act of editing by adding an object to a collection.
String TYPE_BOOKMARK An agent bookmarks/flags/labels/tags/marks an object.
String TYPE_LIKE The act of liking an object.
String TYPE_LISTEN The act of consuming audio content.
String TYPE_VIEW The act of consuming static visual content.
String TYPE_WANT The act of expressing a desire about the object.
String TYPE_WATCH The act of watching an object.
Public Methods
static Action newAction(String actionType, String objectName, Uri objectId, Uri objectUrl)
Creates a new action.
static Action newAction(String actionType, String objectName, Uri objectUrl)
Creates a new action.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String TYPE_ADD

The act of editing by adding an object to a collection.

Constant Value: "http://schema.org/AddAction"

public static final String TYPE_BOOKMARK

An agent bookmarks/flags/labels/tags/marks an object.

Constant Value: "http://schema.org/BookmarkAction"

public static final String TYPE_LIKE

The act of liking an object.

Constant Value: "http://schema.org/LikeAction"

public static final String TYPE_LISTEN

The act of consuming audio content.

Constant Value: "http://schema.org/ListenAction"

public static final String TYPE_VIEW

The act of consuming static visual content.

Constant Value: "http://schema.org/ViewAction"

public static final String TYPE_WANT

The act of expressing a desire about the object.

Constant Value: "http://schema.org/WantAction"

public static final String TYPE_WATCH

The act of watching an object.

Constant Value: "http://schema.org/WatchAction"

Public Methods

public static Action newAction (String actionType, String objectName, Uri objectId, Uri objectUrl)

Creates a new action.

Parameters
actionType The schema.org action type (e.g. "http://schema.org/ListenAction").
objectName Name of the content.
objectId Equivalent web url for the content, if available. See App Indexing. Can be null.
objectUrl The deep link of the content in the App Indexing format.

public static Action newAction (String actionType, String objectName, Uri objectUrl)

Creates a new action.

Parameters
actionType The schema.org action type (e.g. "http://schema.org/ListenAction").
objectName Name of the content.
objectUrl The deep link of the content in the App Indexing format.