# ShareCompat.IntentBuilder

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#)  

# ShareCompat.IntentBuilder

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
ShareCompat.IntentBuilder
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

IntentBuilder is a helper for constructing[ACTION_SEND](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND)and[ACTION_SEND_MULTIPLE](https://developer.android.com/reference/android/content/Intent.html#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](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailBcc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailBcc(java.lang.String))`(String address) ` Add an email address to be used in the "bcc" field of the final Intent.                                                                                    |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailBcc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailBcc(java.lang.String[]))`(String[] addresses) ` Add an array of email addresses to be used in the "bcc" field of the final Intent.                                                                   |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailCc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailCc(java.lang.String[]))`(String[] addresses) ` Add an array of email addresses to be used in the "cc" field of the final Intent.                                                                      |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailCc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailCc(java.lang.String))`(String address) ` Add an email address to be used in the "cc" field of the final Intent.                                                                                       |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailTo](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailTo(java.lang.String[]))`(String[] addresses) ` Add an array of email addresses to be used in the "to" field of the final Intent.                                                                      |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addEmailTo](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addEmailTo(java.lang.String))`(String address) ` Add an email address to be used in the "to" field of the final Intent.                                                                                       |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[addStream](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#addStream(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri.html)` streamUri) ` Add a stream URI to the data that should be shared.                                            |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent.html)                                                | ` `[createChooserIntent](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#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](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | ` `[from](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#from(android.app.Activity))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` launchingActivity) ` Create a new IntentBuilder for launching a sharing action from launchingActivity. |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent.html)                                                | ` `[getIntent](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#getIntent())`() ` Retrieve the Intent as configured so far by the IntentBuilder.                                                                                                                               |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setChooserTitle](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setChooserTitle(int))`(int resId) ` Set the title that will be used for the activity chooser for this share.                                                                                             |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setChooserTitle](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setChooserTitle(java.lang.CharSequence))`(CharSequence title) ` Set the title that will be used for the activity chooser for this share.                                                                 |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setEmailBcc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setEmailBcc(java.lang.String[]))`(String[] addresses) ` Set an array of email addresses to BCC on this share.                                                                                                |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setEmailCc](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setEmailCc(java.lang.String[]))`(String[] addresses) ` Set an array of email addresses to CC on this share.                                                                                                   |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setEmailTo](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setEmailTo(java.lang.String[]))`(String[] addresses) ` Set an array of email addresses as recipients of this share.                                                                                           |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setHtmlText](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setHtmlText(java.lang.String))`(String htmlText) ` Set an HTML string to be sent as part of the share.                                                                                                       |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setStream](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setStream(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri.html)` streamUri) ` Set a stream URI to the data that should be shared.                                            |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setSubject](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setSubject(java.lang.String))`(String subject) ` Set a subject heading for this share; useful for sharing via email.                                                                                          |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setText](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setText(java.lang.CharSequence))`(CharSequence text) ` Set the literal text data to be sent as part of the share.                                                                                                |
| ` `[ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)        | ` `[setType](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setType(java.lang.String))`(String mimeType) ` Set the type of data being shared                                                                                                                                 |
| ` void`                                                                                                                         | ` `[startChooser](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#startChooser())`() ` Start a chooser activity for the current share intent.                                                                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#)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(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### addEmailBcc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailBcc (String address)
```

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

<br />

|                    Parameters                    ||
|-----------|---------------------------------------|
| `address` | `String`: Email address to BCC <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_BCC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_BCC)  

### addEmailBcc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailBcc (String[] addresses)
```

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

<br />

|                      Parameters                      ||
|-------------|-----------------------------------------|
| `addresses` | `String`: Email addresses to BCC <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_BCC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_BCC)  

### addEmailCc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailCc (String[] addresses)
```

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

<br />

|                     Parameters                      ||
|-------------|----------------------------------------|
| `addresses` | `String`: Email addresses to CC <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_CC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_CC)  

### addEmailCc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailCc (String address)
```

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

<br />

|                   Parameters                    ||
|-----------|--------------------------------------|
| `address` | `String`: Email address to CC <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_CC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_CC)  

### addEmailTo

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailTo (String[] addresses)
```

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

<br />

|                        Parameters                        ||
|-------------|---------------------------------------------|
| `addresses` | `String`: Email addresses to send to <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_EMAIL](https://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL)  

### addEmailTo

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addEmailTo (String address)
```

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

<br />

|                      Parameters                      ||
|-----------|-------------------------------------------|
| `address` | `String`: Email address to send to <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_EMAIL](https://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL)  

### addStream

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder addStream (Uri streamUri)
```

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.

<br />

|                      Parameters                       ||
|-------------|------------------------------------------|
| `streamUri` | `Uri`: URI of the stream to share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_STREAM](https://developer.android.com/reference/android/content/Intent.html#EXTRA_STREAM)
- [ACTION_SEND](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND)
- [ACTION_SEND_MULTIPLE](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND_MULTIPLE)  

### createChooserIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
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.

<br />

|                                                                      Returns                                                                       ||
|-------------------------------------------------------------------------------|---------------------------------------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | A chooser Intent for the currently configured sharing action <br /> |

### from

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder from (Activity launchingActivity)
```

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

<br />

|                                      Parameters                                       ||
|---------------------|------------------------------------------------------------------|
| `launchingActivity` | `Activity`: Activity that the share will be launched from <br /> |

|                                                                          Returns                                                                           ||
|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | a new IntentBuilder instance <br /> |

### getIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent getIntent ()
```

Retrieve the Intent as configured so far by the IntentBuilder. This Intent is suitable for use in a ShareActionProvider or chooser dialog.

To create an intent that will launch the activity chooser so that the user may select a target for the share, see[createChooserIntent()](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#createChooserIntent()).

<br />

|                                                                  Returns                                                                  ||
|-------------------------------------------------------------------------------|------------------------------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | The current Intent being configured by this builder <br /> |

### setChooserTitle

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setChooserTitle (int resId)
```

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

<br />

|                          Parameters                           ||
|---------|------------------------------------------------------|
| `resId` | `int`: Resource ID of the title string to use <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

### setChooserTitle

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setChooserTitle (CharSequence title)
```

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

<br />

|                  Parameters                  ||
|---------|-------------------------------------|
| `title` | `CharSequence`: Title string <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

### setEmailBcc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setEmailBcc (String[] addresses)
```

Set an array of email addresses to BCC on this share. This replaces all current "BCC" recipients that have been set so far.

<br />

|                            Parameters                             ||
|-------------|------------------------------------------------------|
| `addresses` | `String`: Email addresses to BCC on the share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_BCC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_BCC)  

### setEmailCc

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setEmailCc (String[] addresses)
```

Set an array of email addresses to CC on this share. This replaces all current "CC" recipients that have been set so far.

<br />

|                            Parameters                            ||
|-------------|-----------------------------------------------------|
| `addresses` | `String`: Email addresses to CC on the share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_CC](https://developer.android.com/reference/android/content/Intent.html#EXTRA_CC)  

### setEmailTo

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setEmailTo (String[] addresses)
```

Set an array of email addresses as recipients of this share. This replaces all current "to" recipients that have been set so far.

<br />

|                        Parameters                        ||
|-------------|---------------------------------------------|
| `addresses` | `String`: Email addresses to send to <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_EMAIL](https://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL)  

### setHtmlText

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setHtmlText (String htmlText)
```

Set an HTML string to be sent as part of the share. If[EXTRA_TEXT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT)has not already been supplied, a styled version of the supplied HTML text will be added as EXTRA_TEXT as parsed by[Html.fromHtml](https://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)).

<br />

|                                                      Parameters                                                      ||
|------------|----------------------------------------------------------------------------------------------------------|
| `htmlText` | `String`: A string containing HTML markup as a richer version of the text provided by EXTRA_TEXT. <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [setText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder#setText(java.lang.CharSequence))  

### setStream

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setStream (Uri streamUri)
```

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.

<br />

<br />

|                      Parameters                       ||
|-------------|------------------------------------------|
| `streamUri` | `Uri`: URI of the stream to share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_STREAM](https://developer.android.com/reference/android/content/Intent.html#EXTRA_STREAM)  

### setSubject

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setSubject (String subject)
```

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

<br />

|                         Parameters                         ||
|-----------|-------------------------------------------------|
| `subject` | `String`: Subject heading for this share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_SUBJECT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SUBJECT)  

### setText

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setText (CharSequence text)
```

Set the literal text data to be sent as part of the share. This may be a styled CharSequence.

<br />

|                  Parameters                  ||
|--------|--------------------------------------|
| `text` | `CharSequence`: Text to share <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [EXTRA_TEXT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT)  

### setType

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ShareCompat.IntentBuilder setType (String mimeType)
```

Set the type of data being shared

<br />

|                        Parameters                        ||
|------------|----------------------------------------------|
| `mimeType` | `String`: mimetype of the shared data <br /> |

|                                                                               Returns                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining <br /> |

**See also:**

- [setType(String)](https://developer.android.com/reference/android/content/Intent.html#setType(java.lang.String))  

### startChooser

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startChooser ()
```

Start a chooser activity for the current share intent.

Note that under most circumstances you should use[ShareCompat.configureMenuItem()](https://developer.android.com/reference/android/support/v4/app/ShareCompat#configureMenuItem(android.view.MenuItem, android.support.v4.app.ShareCompat.IntentBuilder))to add a Share item to the menu while presenting a detail view of the content to be shared instead of invoking this directly.

<br />

<br />

-

  ## Annotations

  - [NotificationCompat.Action.SemanticAction](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.SemanticAction)
-

  ## Interfaces

  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.DelegateProvider)
  - [ActivityCompat.OnRequestPermissionsResultCallback](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.OnRequestPermissionsResultCallback)
  - [ActivityCompat.PermissionCompatDelegate](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.PermissionCompatDelegate)
  - [FragmentManager.BackStackEntry](https://developer.android.com/reference/android/support/v4/app/FragmentManager.BackStackEntry)
  - [FragmentManager.OnBackStackChangedListener](https://developer.android.com/reference/android/support/v4/app/FragmentManager.OnBackStackChangedListener)
  - [LoaderManager.LoaderCallbacks](https://developer.android.com/reference/android/support/v4/app/LoaderManager.LoaderCallbacks)
  - [NotificationCompat.Action.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Extender)
  - [NotificationCompat.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Extender)
  - [SharedElementCallback.OnSharedElementsReadyListener](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback.OnSharedElementsReadyListener)
  - [TaskStackBuilder.SupportParentable](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.SupportParentable)
-

  ## Classes

  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle)
  - [ActivityCompat](https://developer.android.com/reference/android/support/v4/app/ActivityCompat)
  - [ActivityManagerCompat](https://developer.android.com/reference/android/support/v4/app/ActivityManagerCompat)
  - [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)
  - [AlarmManagerCompat](https://developer.android.com/reference/android/support/v4/app/AlarmManagerCompat)
  - [AppLaunchChecker](https://developer.android.com/reference/android/support/v4/app/AppLaunchChecker)
  - [AppOpsManagerCompat](https://developer.android.com/reference/android/support/v4/app/AppOpsManagerCompat)
  - [BundleCompat](https://developer.android.com/reference/android/support/v4/app/BundleCompat)
  - [DialogFragment](https://developer.android.com/reference/android/support/v4/app/DialogFragment)
  - [Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)
  - [Fragment.SavedState](https://developer.android.com/reference/android/support/v4/app/Fragment.SavedState)
  - [FragmentActivity](https://developer.android.com/reference/android/support/v4/app/FragmentActivity)
  - [FragmentContainer](https://developer.android.com/reference/android/support/v4/app/FragmentContainer)
  - [FragmentController](https://developer.android.com/reference/android/support/v4/app/FragmentController)
  - [FragmentHostCallback](https://developer.android.com/reference/android/support/v4/app/FragmentHostCallback)
  - [FragmentManager](https://developer.android.com/reference/android/support/v4/app/FragmentManager)
  - [FragmentManager.FragmentLifecycleCallbacks](https://developer.android.com/reference/android/support/v4/app/FragmentManager.FragmentLifecycleCallbacks)
  - [FragmentManagerNonConfig](https://developer.android.com/reference/android/support/v4/app/FragmentManagerNonConfig)
  - [FragmentPagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter)
  - [FragmentStatePagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentStatePagerAdapter)
  - [FragmentTabHost](https://developer.android.com/reference/android/support/v4/app/FragmentTabHost)
  - [FragmentTransaction](https://developer.android.com/reference/android/support/v4/app/FragmentTransaction)
  - [FrameMetricsAggregator](https://developer.android.com/reference/android/support/v4/app/FrameMetricsAggregator)
  - [JobIntentService](https://developer.android.com/reference/android/support/v4/app/JobIntentService)
  - [ListFragment](https://developer.android.com/reference/android/support/v4/app/ListFragment)
  - [LoaderManager](https://developer.android.com/reference/android/support/v4/app/LoaderManager)
  - [NavUtils](https://developer.android.com/reference/android/support/v4/app/NavUtils)
  - [NotificationCompat](https://developer.android.com/reference/android/support/v4/app/NotificationCompat)
  - [NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)
  - [NotificationCompat.Action.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Builder)
  - [NotificationCompat.Action.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.WearableExtender)
  - [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle)
  - [NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle)
  - [NotificationCompat.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder)
  - [NotificationCompat.CarExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender)
  - [NotificationCompat.CarExtender.UnreadConversation](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation)
  - [NotificationCompat.CarExtender.UnreadConversation.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation.Builder)
  - [NotificationCompat.DecoratedCustomViewStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.DecoratedCustomViewStyle)
  - [NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle)
  - [NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)
  - [NotificationCompat.MessagingStyle.Message](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.Message)
  - [NotificationCompat.Style](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style)
  - [NotificationCompat.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.WearableExtender)
  - [NotificationCompatExtras](https://developer.android.com/reference/android/support/v4/app/NotificationCompatExtras)
  - [NotificationCompatSideChannelService](https://developer.android.com/reference/android/support/v4/app/NotificationCompatSideChannelService)
  - [NotificationManagerCompat](https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat)
  - [RemoteInput](https://developer.android.com/reference/android/support/v4/app/RemoteInput)
  - [RemoteInput.Builder](https://developer.android.com/reference/android/support/v4/app/RemoteInput.Builder)
  - [ServiceCompat](https://developer.android.com/reference/android/support/v4/app/ServiceCompat)
  - [ShareCompat](https://developer.android.com/reference/android/support/v4/app/ShareCompat)
  - [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)
  - [ShareCompat.IntentReader](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentReader)
  - [SharedElementCallback](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback)
  - [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)
-

  ## Exceptions

  - [Fragment.InstantiationException](https://developer.android.com/reference/android/support/v4/app/Fragment.InstantiationException)