EmojiCompatInitializer

public class EmojiCompatInitializer
extends Object implements Initializer<Boolean>

java.lang.Object
   ↳ androidx.emoji2.text.EmojiCompatInitializer


Initializer for configuring EmojiCompat with the system installed downloadable font provider.

This initializer will initialize EmojiCompat immediately then defer loading the font for a short delay to avoid delaying application startup. Typically, the font will be loaded shortly after the first screen of your application loads, which means users may see system emoji briefly prior to the compat font loading.

This is the recommended configuration for all apps that don't need specialized configuration, and don't need to control the background thread that initialization runs on. For more information see DefaultEmojiCompatConfig.

In addition to the reasons listed in DefaultEmojiCompatConfig you may wish to disable this automatic configuration if you intend to call initialization from an existing background thread pool in your application.

This is enabled by default by including the :emoji2:emoji2 gradle artifact. To disable the default configuration (and allow manual configuration) add this to your manifest:

     
         
     
 

Summary

Public constructors

EmojiCompatInitializer()

Public methods

Boolean create(Context context)

Initialize EmojiCompat with the app's context.

List<Class<? extends Initializer<?>>> dependencies()

No dependencies

Inherited methods

Public constructors

EmojiCompatInitializer

public EmojiCompatInitializer ()

Public methods

create

public Boolean create (Context context)

Initialize EmojiCompat with the app's context.

Parameters
context Context: application context

Returns
Boolean result of default init

dependencies

public List<Class<? extends Initializer<?>>> dependencies ()

No dependencies

Returns
List<Class<? extends Initializer<?>>>