PlusShare | 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

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Nested Classes | Constants | Protected Ctors | Methods | Inherited Methods | [Expand All]
public final class

# PlusShare

extends Object

java.lang.Object
↳ | com.google.android.gms.plus.PlusShare

## Class Overview

Utility class for including resources in posts shared on Google+ through an `ACTION_SEND` intent.

## Summary

Nested Classes
class | PlusShare.Builder |

Constants
String | EXTRA_CALL_TO_ACTION | Used as a bundle extra field to describe a call-to-action button for a post on Google+.
String | EXTRA_CONTENT_DEEP_LINK_ID | Used as a string extra field in `ACTION_SEND` intents to specify a resource to be shared on Google+.
String | EXTRA_CONTENT_DEEP_LINK_METADATA | Used as a bundle extra field in `ACTION_SEND` intents to describe a resource to be shared on Google+.
String | EXTRA_CONTENT_URL | This is a URL for the content of the post.
String | EXTRA_IS_INTERACTIVE_POST | Extra indicating that this is an interactive post.
String | EXTRA_SENDER_ID | The ID of the sender on Google+.
String | KEY_CALL_TO_ACTION_DEEP_LINK_ID | Bundle key used for the `String` deep-link ID of the call-to-action button.
String | KEY_CALL_TO_ACTION_LABEL | Bundle key used for the `String` label placeholder text of the call-to-action button.
String | KEY_CALL_TO_ACTION_URL | Bundle key used for the `String` URL of the call-to-action button.
String | KEY_CONTENT_DEEP_LINK_METADATA_DESCRIPTION | Bundle key used for the `String` description of the resource shared on Google+.
String | KEY_CONTENT_DEEP_LINK_METADATA_THUMBNAIL_URL | Bundle key used for the `String` thumbnail URL of the resource shared on Google+.
String | KEY_CONTENT_DEEP_LINK_METADATA_TITLE | Bundle key used for the `String` title of the resource shared on Google+.
String | PARAM_CONTENT_DEEP_LINK_ID | The query parameter containing the deep-link ID.

Protected Constructors
| PlusShare()

Public Methods
static Person | createPerson(String id, String displayName) Creates a person to use as a recipient with the given ID and display name.
static String | getDeepLinkId(Intent intent) Get the incoming deep link.

[Expand] Inherited Methods
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)

## Constants

#### public static final String EXTRA_CALL_TO_ACTION

Used as a bundle extra field to describe a call-to-action button for a post on Google+.

Constant Value: "com.google.android.apps.plus.CALL_TO_ACTION"

#### public static final String EXTRA_CONTENT_DEEP_LINK_ID

Used as a string extra field in `ACTION_SEND` intents to specify a resource to be shared on Google+.

Constant Value: "com.google.android.apps.plus.CONTENT_DEEP_LINK_ID"

#### public static final String EXTRA_CONTENT_DEEP_LINK_METADATA

Used as a bundle extra field in `ACTION_SEND` intents to describe a resource to be shared on Google+. You should only set this extra with `EXTRA_CONTENT_DEEP_LINK_ID`, and when the deep-link ID is not a URI.

Constant Value: "com.google.android.apps.plus.CONTENT_DEEP_LINK_METADATA"

#### public static final String EXTRA_CONTENT_URL

This is a URL for the content of the post.

Constant Value: "com.google.android.apps.plus.CONTENT_URL"

#### public static final String EXTRA_IS_INTERACTIVE_POST

Extra indicating that this is an interactive post.

Constant Value: "com.google.android.apps.plus.GOOGLE_INTERACTIVE_POST"

#### public static final String EXTRA_SENDER_ID

The ID of the sender on Google+. This value is used by the Google+ app to check if there is a mismatch between the sender and the user authenticated in the Google+ app.

##### See Also

- `getId()`
- `getCurrentPerson()`

Constant Value: "com.google.android.apps.plus.SENDER_ID"

#### public static final String KEY_CALL_TO_ACTION_DEEP_LINK_ID

Bundle key used for the `String` deep-link ID of the call-to-action button. This key is used in the `EXTRA_CALL_TO_ACTION` bundle.

Constant Value: "deepLinkId"

#### public static final String KEY_CALL_TO_ACTION_LABEL

Bundle key used for the `String` label placeholder text of the call-to-action button. This key is used in the `EXTRA_CALL_TO_ACTION` bundle.

Constant Value: "label"

#### public static final String KEY_CALL_TO_ACTION_URL

Bundle key used for the `String` URL of the call-to-action button. This key is used in the `EXTRA_CALL_TO_ACTION` bundle.

Constant Value: "url"

#### public static final String KEY_CONTENT_DEEP_LINK_METADATA_DESCRIPTION

Bundle key used for the `String` description of the resource shared on Google+. This key is used in the `EXTRA_CONTENT_DEEP_LINK_METADATA` bundle.

Constant Value: "description"

#### public static final String KEY_CONTENT_DEEP_LINK_METADATA_THUMBNAIL_URL

Bundle key used for the `String` thumbnail URL of the resource shared on Google+. This key is used in the `EXTRA_CONTENT_DEEP_LINK_METADATA` bundle.

Constant Value: "thumbnailUrl"

#### public static final String KEY_CONTENT_DEEP_LINK_METADATA_TITLE

Bundle key used for the `String` title of the resource shared on Google+. This key is used in the `EXTRA_CONTENT_DEEP_LINK_METADATA` bundle.

Constant Value: "title"

#### public static final String PARAM_CONTENT_DEEP_LINK_ID

The query parameter containing the deep-link ID. This is populated when a deep link is clicked from a Google+ post.

Constant Value: "deep_link_id"

## Protected Constructors

#### protected PlusShare ()

## Public Methods

#### public static Person createPerson (String id, String displayName)

Creates a person to use as a recipient with the given ID and display name. See `setRecipients(List)`.

##### Parameters

id | The recipient's ID, see `getId()`.
displayName | The recipient's display name, see `getDisplayName()`.

#### public static String getDeepLinkId (Intent intent)

Get the incoming deep link.

##### Parameters

intent | The intent passed to your activity, containing a deep_link_id.

##### Returns

- The deep-link ID.