added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

ShareCompat.IntentBuilder

public static class ShareCompat.IntentBuilder
extends Object

java.lang.Object
   ↳ android.support.v4.app.ShareCompat.IntentBuilder


IntentBuilder is a helper for constructing ACTION_SEND and ACTION_SEND_MULTIPLE sharing intents and starting activities to share content. The ComponentName and package name of the calling activity will be included.

Summary

Public methods

ShareCompat.IntentBuilder addEmailBcc(String address)

Add an email address to be used in the "bcc" field of the final Intent.

ShareCompat.IntentBuilder addEmailBcc(String[] addresses)

Add an array of email addresses to be used in the "bcc" field of the final Intent.

ShareCompat.IntentBuilder addEmailCc(String[] addresses)

Add an array of email addresses to be used in the "cc" field of the final Intent.

ShareCompat.IntentBuilder addEmailCc(String address)

Add an email address to be used in the "cc" field of the final Intent.

ShareCompat.IntentBuilder addEmailTo(String[] addresses)

Add an array of email addresses to be used in the "to" field of the final Intent.

ShareCompat.IntentBuilder addEmailTo(String address)

Add an email address to be used in the "to" field of the final Intent.

ShareCompat.IntentBuilder addStream(Uri streamUri)

Add a stream URI to the data that should be shared.

Intent createChooserIntent()

Create an Intent that will launch the standard Android activity chooser, allowing the user to pick what activity/app on the system should handle the share.

static ShareCompat.IntentBuilder from(Activity launchingActivity)

Create a new IntentBuilder for launching a sharing action from launchingActivity.

Intent getIntent()

Retrieve the Intent as configured so far by the IntentBuilder.

ShareCompat.IntentBuilder setChooserTitle(int resId)

Set the title that will be used for the activity chooser for this share.

ShareCompat.IntentBuilder setChooserTitle(CharSequence title)

Set the title that will be used for the activity chooser for this share.

ShareCompat.IntentBuilder setEmailBcc(String[] addresses)

Set an array of email addresses to BCC on this share.

ShareCompat.IntentBuilder setEmailCc(String[] addresses)

Set an array of email addresses to CC on this share.

ShareCompat.IntentBuilder setEmailTo(String[] addresses)

Set an array of email addresses as recipients of this share.

ShareCompat.IntentBuilder setHtmlText(String htmlText)

Set an HTML string to be sent as part of the share.

ShareCompat.IntentBuilder setStream(Uri streamUri)

Set a stream URI to the data that should be shared.

ShareCompat.IntentBuilder setSubject(String subject)

Set a subject heading for this share; useful for sharing via email.

ShareCompat.IntentBuilder setText(CharSequence text)

Set the literal text data to be sent as part of the share.

ShareCompat.IntentBuilder setType(String mimeType)

Set the type of data being shared

void