# ShareCompat.IntentBuilder

# ShareCompat.IntentBuilder

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/app/ShareCompat.java+class:androidx.core.app.ShareCompat.IntentBuilder)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/app/ShareCompat.IntentBuilder "View this page in Java")

<br />

```
class 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 constructors                                                                                                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#IntentBuilder(android.content.Context))`(launchingContext: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Create a new IntentBuilder for launching a sharing action from launchingContext. |

|                                                         ### Public functions                                                          |
|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailBcc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailBcc(java.lang.String))`(address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Add an email address to be used in the "bcc" field of the final Intent.                                                                                                    |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailBcc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailBcc(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>)` Add an array of email addresses to be used in the "bcc" field of the final Intent. |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailCc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailCc(java.lang.String))`(address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Add an email address to be used in the "cc" field of the final Intent.                                                                                                       |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailCc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailCc(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>)` Add an array of email addresses to be used in the "cc" field of the final Intent.    |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailTo](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailTo(java.lang.String))`(address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Add an email address to be used in the "to" field of the final Intent.                                                                                                       |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addEmailTo](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addEmailTo(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>)` Add an array of email addresses to be used in the "to" field of the final Intent.    |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [addStream](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#addStream(android.net.Uri))`(streamUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`)` 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/kotlin/androidx/core/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.                                                                                                            |
| `java-static `[ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | ~~[from](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#from(android.app.Activity))~~`(launchingActivity: `[Activity](https://developer.android.com/reference/android/app/Activity.html)`)` **This function is deprecated.** Use the constructor of IntentBuilder <br />                                                                                               |
| [Intent](https://developer.android.com/reference/android/content/Intent.html)                                                         | [getIntent](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#getIntent())`()` Retrieve the Intent as configured so far by the IntentBuilder.                                                                                                                                                                                                                             |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setChooserTitle](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setChooserTitle(int))`(resId: @`[StringRes](https://developer.android.com/reference/kotlin/androidx/annotation/StringRes)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Set the title that will be used for the activity chooser for this share.                   |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setChooserTitle](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setChooserTitle(java.lang.CharSequence))`(title: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Set the title that will be used for the activity chooser for this share.                                                                         |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setEmailBcc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setEmailBcc(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?)` Set an array of email addresses to BCC on this share.                             |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setEmailCc](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setEmailCc(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?)` Set an array of email addresses to CC on this share.                                |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setEmailTo](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setEmailTo(java.lang.String[]))`(addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?)` Set an array of email addresses as recipients of this share.                        |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setHtmlText](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setHtmlText(java.lang.String))`(htmlText: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?)` Set an HTML string to be sent as part of the share.                                                                                                                      |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setStream](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setStream(android.net.Uri))`(streamUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`?)` Set a stream URI to the data that should be shared.                                                                                                                                        |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setSubject](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setSubject(java.lang.String))`(subject: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?)` Set a subject heading for this share; useful for sharing via email.                                                                                                         |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setText](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setText(java.lang.CharSequence))`(text: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Set the literal text data to be sent as part of the share.                                                                                                        |
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder)               | [setType](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setType(java.lang.String))`(mimeType: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?)` Set the type of data being shared                                                                                                                                                |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                         | [startChooser](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#startChooser())`()` Start a chooser activity for the current share intent.                                                                                                                                                                                                                               |

## Public constructors

### IntentBuilder

Added in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
IntentBuilder(launchingContext: Context)
```

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

Note that builders that are not constructed with an[Activity](https://developer.android.com/reference/android/app/Activity.html)context (or a wrapped activity context) will not set the[calling activity](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat#EXTRA_CALLING_ACTIVITY())on the returned intent.  

|                                             Parameters                                              |
|-----------------------------------------------------------------------------------------------------|----------------------------------------------|
| `launchingContext: `[Context](https://developer.android.com/reference/android/content/Context.html) | Context that the share will be launched from |

## Public functions

### addEmailBcc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

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

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|----------------------|
| `address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | Email address to BCC |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addEmailBcc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun addEmailBcc(addresses: Array<String!>): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | Email addresses to BCC |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addEmailCc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

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

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|---------------------|
| `address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | Email address to CC |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addEmailCc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun addEmailCc(addresses: Array<String!>): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | Email addresses to CC |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addEmailTo

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

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

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|--------------------------|
| `address: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | Email address to send to |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addEmailTo

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun addEmailTo(addresses: Array<String!>): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | Email addresses to send to |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### addStream

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

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](https://developer.android.com/reference/android/net/Uri.html) | URI of the stream to share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

|                                                      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[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun createChooserIntent(): Intent
```

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.  

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

### from

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  
Deprecated in[1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)  

```
java-static fun [from](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#from(android.app.Activity))(launchingActivity: Activity): ShareCompat.IntentBuilder
```
| **This function is deprecated.**   
|
| Use the constructor of IntentBuilder

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

|                                             Parameters                                             |
|----------------------------------------------------------------------------------------------------|-----------------------------------------------|
| `launchingActivity: `[Activity](https://developer.android.com/reference/android/app/Activity.html) | Activity that the share will be launched from |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | a new IntentBuilder instance |

### getIntent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getIntent(): Intent
```

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/kotlin/androidx/core/app/ShareCompat.IntentBuilder#createChooserIntent()).  

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

### setChooserTitle

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setChooserTitle(resId: @StringRes Int): ShareCompat.IntentBuilder
```

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

|                                                                                    Parameters                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| `resId: @`[StringRes](https://developer.android.com/reference/kotlin/androidx/annotation/StringRes)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Resource ID of the title string to use |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

### setChooserTitle

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setChooserTitle(title: CharSequence?): ShareCompat.IntentBuilder
```

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

|                                                 Parameters                                                 |
|------------------------------------------------------------------------------------------------------------|--------------|
| `title: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | Title string |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

### setEmailBcc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setEmailBcc(addresses: Array<String!>?): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?` | Email addresses to BCC on the share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setEmailCc

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setEmailCc(addresses: Array<String!>?): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?` | Email addresses to CC on the share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setEmailTo

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setEmailTo(addresses: Array<String!>?): ShareCompat.IntentBuilder
```

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

|                                                                                      Parameters                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
| `addresses: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>?` | Email addresses to send to |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setHtmlText

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setHtmlText(htmlText: String?): ShareCompat.IntentBuilder
```

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

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| `htmlText: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | A string containing HTML markup as a richer version of the text provided by EXTRA_TEXT. |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

|                                                               See also                                                                |
|---------------------------------------------------------------------------------------------------------------------------------------|---|
| [setText](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder#setText(java.lang.CharSequence)) |   |

### setStream

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setStream(streamUri: Uri?): ShareCompat.IntentBuilder
```

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](https://developer.android.com/reference/android/net/Uri.html)`?` | URI of the stream to share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setSubject

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setSubject(subject: String?): ShareCompat.IntentBuilder
```

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

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|--------------------------------|
| `subject: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | Subject heading for this share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setText

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setText(text: CharSequence?): ShareCompat.IntentBuilder
```

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

|                                                Parameters                                                 |
|-----------------------------------------------------------------------------------------------------------|---------------|
| `text: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | Text to share |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### setType

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setType(mimeType: String?): ShareCompat.IntentBuilder
```

Set the type of data being shared  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|-----------------------------|
| `mimeType: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | mimetype of the shared data |

|                                                         Returns                                                         |
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [ShareCompat.IntentBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/ShareCompat.IntentBuilder) | This IntentBuilder for method chaining |

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

### startChooser

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun startChooser(): Unit
```

Start a chooser activity for the current share intent.