java.lang.Object | |
↳ | com.google.android.gms.plus.PlusShare.Builder |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new Builder for launching a sharing action from the given context.
| |||||||||||
Create a new Builder for launching a sharing action from launchingActivity.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a call-to-action button for an interactive post.
| |||||||||||
Add a stream URI to the data that should be shared.
| |||||||||||
Retrieve the Intent as configured so far by the Builder.
| |||||||||||
Include a deep-link URI of a resource to share on Google+.
| |||||||||||
Include a deep-link ID to a resource to share on Google+.
| |||||||||||
Sets a URL to link to from the content on the web.
| |||||||||||
Sets a list of people to send the interactive post to.
| |||||||||||
Set a stream URI to the data that should be shared.
| |||||||||||
Set a pre-filled message to be sent as part of the share.
| |||||||||||
Set the type of data being shared.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a new Builder for launching a sharing action from the given context.
Parameters | |
---|---|
context |
Context :
Context that the share will be launched from
|
Create a new Builder for launching a sharing action from launchingActivity.
Parameters | |
---|---|
launchingActivity |
Activity :
Activity that the share will be launched from
|
Adds a call-to-action button for an interactive post. To use this method, you must have
passed a signed-in PlusClient to the
Builder.Builder(Activity, PlusClient) constructor or an
IllegalStateException
will be thrown.
Parameters | |
---|---|
label |
String :
The call-to-action label. Choose a value from the list of
list |
uri |
Uri :
The URL to link to when the user clicks the call-to-action. This parameter
is required. |
deepLinkId |
String :
A deep-link ID to send to mobile clients when the user
clicks the call-to-action. This parameter is optional.
|
Returns | |
---|---|
PlusShare.Builder |
Add a stream URI to the data that should be shared. If this is not the first stream URI added the final intent constructed will become an ACTION_SEND_MULTIPLE intent. Not all apps will handle both ACTION_SEND and ACTION_SEND_MULTIPLE.
Parameters | |
---|---|
streamUri |
Uri :
URI of the stream to share. |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining. |
See also:
Retrieve the Intent as configured so far by the Builder.
Returns | |
---|---|
Intent |
The current Intent being configured by this builder |
Include a deep-link URI of a resource to share on Google+.
Parameters | |
---|---|
deepLinkId |
String :
The deep-link ID to a resource to share on Google+.
This parameter is required. |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining. |
Include a deep-link ID to a resource to share on Google+.
Parameters | |
---|---|
deepLinkId |
String :
The deep-link ID to a resource to share on Google+.
This parameter is required. |
title |
String :
The title of the resource. Used if there is no content URL to display.
This parameter is optional. |
description |
String :
The description of a resource. Used if there is no content URL to
display. This parameter is optional. |
thumbnailUri |
Uri :
The thumbnailUri for a resource. Used if there is no content URL to
display. This parameter is optional. |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining. |
Sets a URL to link to from the content on the web. The content URL is required when
used in conjunction with addCallToAction(String, Uri, String)
to build an
interactive post, and to provide the user context for the call-to-action button.
Parameters | |
---|---|
uri |
Uri :
the URL to link to on the web. |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining. |
Sets a list of people to send the interactive post to.
This sets the initial people to share with, but the user can change who the post is shared with before posting. A maximum of ten recipients are allowed.
Parameters | |
---|---|
user |
Person :
The user to send the post as, see
getCurrentPerson(com.google.android.gms.common.api.GoogleApiClient) . |
recipientList |
List :
A list of recipients. See load(GoogleApiClient, String...) and
createPerson(String, String) . |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining. |
Set a stream URI to the data that should be shared.
This replaces all currently set stream URIs and will produce a single-stream ACTION_SEND intent.
Parameters | |
---|---|
streamUri |
Uri :
URI of the stream to share |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining |
See also:
Set a pre-filled message to be sent as part of the share. This may be a styled CharSequence.
Parameters | |
---|---|
text |
CharSequence :
Text to share |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining |
See also:
Set the type of data being shared.
Parameters | |
---|---|
mimeType |
String :
mimetype of the shared data |
Returns | |
---|---|
PlusShare.Builder |
This Builder for method chaining |
See also: