# BundledEmojiCompatConfig

Artifact: [androidx.emoji2:emoji2-bundled](https://developer.android.com/jetpack/androidx/releases/emoji2) [View Source](https://cs.android.com/search?q=file:androidx/emoji2/bundled/BundledEmojiCompatConfig.java+class:androidx.emoji2.bundled.BundledEmojiCompatConfig) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/emoji2#1.0.0)

*** ** * ** ***


```
class BundledEmojiCompatConfig : EmojiCompat.Config
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.emoji2.text.EmojiCompat.Config](https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config) ||
|   | ↳ | [androidx.emoji2.bundled.BundledEmojiCompatConfig](https://developer.android.com/reference/kotlin/androidx/emoji2/bundled/BundledEmojiCompatConfig) |

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` implementation that loads the metadata using AssetManager and bundled resources.

```kotlin
EmojiCompat.init(new BundledEmojiCompatConfig(context));
```
Including the emoji2-bundled artifact disables the `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompatInitializer`. You must manually call EmojiCompat.init when using the bundled configuration.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat` |   |

## Summary

| ### Public constructors |
|---|
| `[BundledEmojiCompatConfig](https://developer.android.com/reference/kotlin/androidx/emoji2/bundled/BundledEmojiCompatConfig#BundledEmojiCompatConfig(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html)` **This function is deprecated.** please call BundledEmojiCompatConfig(context, executor) to control the font loading thread. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/emoji2/bundled/BundledEmojiCompatConfig#BundledEmojiCompatConfig(android.content.Context,java.util.concurrent.Executor)(context: https://developer.android.com/reference/android/content/Context.html, fontLoadExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html)` Controls the executor font is loaded on. |

### Inherited functions

From [androidx.emoji2.text.EmojiCompat.Config](https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config) `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.MetadataRepoLoader` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#getMetadataRepoLoader()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.MetadataRepoLoader`.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#registerInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback)(initCallback: https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.InitCallback)`

Registers an initialization callback.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#registerInitCallback(java.util.concurrent.Executor,androidx.emoji2.text.EmojiCompat.InitCallback)(
executor: https://developer.android.com/reference/java/util/concurrent/Executor.html,
initCallback: https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.InitCallback
)`

Registers an initialization callback.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setEmojiSpanIndicatorColor(int)(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the color used as emoji span indicator.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setEmojiSpanIndicatorEnabled(boolean)(emojiSpanIndicatorEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Determines whether a background will be drawn for the emojis that are found and replaced by EmojiCompat.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setGlyphChecker(androidx.emoji2.text.EmojiCompat.GlyphChecker)(glyphChecker: https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.GlyphChecker)`

The interface that is used by EmojiCompat in order to check if a given emoji can be rendered by the system.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setMetadataLoadStrategy(int)(strategy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Determines the strategy to start loading the metadata.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setReplaceAll(boolean)(replaceAll: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Determines whether EmojiCompat should replace all the emojis it finds with the EmojiSpans.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setSpanFactory(androidx.emoji2.text.EmojiCompat.SpanFactory)(factory: https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.SpanFactory)`

Set the span factory used to actually draw emoji replacements.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setUseAfterUpdatableSystemFonts(boolean)(useAfter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Configure whether EmojiCompat should continue to process emojis and load metadata on devices that support Updatable System Fonts (API 35 and above).
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setUseEmojiAsDefaultStyle(boolean)(useEmojiAsDefaultStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Determines whether EmojiCompat should use the emoji presentation style for emojis that have text style as default.
`https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#setUseEmojiAsDefaultStyle(boolean,java.util.List<java.lang.Integer>)(
useEmojiAsDefaultStyle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html,
emojiAsDefaultStyleExceptions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>?
)` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config` `https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.Config#unregisterInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback)(initCallback: https://developer.android.com/reference/kotlin/androidx/emoji2/text/EmojiCompat.InitCallback)`

Unregisters a callback that was added before.

## Public constructors

### BundledEmojiCompatConfig

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

```
[BundledEmojiCompatConfig](https://developer.android.com/reference/kotlin/androidx/emoji2/bundled/BundledEmojiCompatConfig#BundledEmojiCompatConfig(android.content.Context))(context: Context)
```

> [!CAUTION]
> **This function is deprecated.**   
>
> please call BundledEmojiCompatConfig(context, executor) to control the font loading thread. This constructor will spin up a new temporary thread.

Font will be loaded on a new temporary Thread.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Context instance |

### BundledEmojiCompatConfig

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

```
BundledEmojiCompatConfig(context: Context, fontLoadExecutor: Executor)
```

Controls the executor font is loaded on.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Context instance |
| `fontLoadExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | Executor to load font on |