# EmojiCompat.InitCallback

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

*** ** * ** ***


```
public abstract class EmojiCompat.InitCallback
```

<br />

*** ** * ** ***

Listener class for the initialization of the EmojiCompat.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/emoji2/text/EmojiCompat.InitCallback#InitCallback()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/emoji2/text/EmojiCompat.InitCallback#onFailed(java.lang.Throwable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Throwable.html throwable)` Called when an unrecoverable error occurs during EmojiCompat initialization. |
| `void` | `https://developer.android.com/reference/androidx/emoji2/text/EmojiCompat.InitCallback#onInitialized()()` Called when EmojiCompat is initialized and the emoji data is loaded. |

## Public constructors

### InitCallback

Added in 1.0.0

```
public InitCallback()
```

## Public methods

### onFailed

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

```
public void onFailed(@Nullable Throwable throwable)
```

Called when an unrecoverable error occurs during EmojiCompat initialization. When used on devices running API 18 or below, this function is never called.

### onInitialized

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

```
public void onInitialized()
```

Called when EmojiCompat is initialized and the emoji data is loaded. When used on devices running API 18 or below, this function is always called.