
Fast, localized offline Unicode emoji database offering powerful search, multilingual names/keywords, grouping, variant support, lazy SQLite connection with auto-close timeout, and reactive stream searches.
Komoji is a combination of Kotlin and Emoji — a Kotlin Multiplatform library designed to provide fast, localized, and fully offline access to Unicode emoji data.
Built around a lightweight SQLite database, Komoji offers powerful emoji search, multilingual metadata, emoji grouping, variant support, and reactive APIs for Android, iOS, and JVM applications. The library manages its database connection automatically with lazy initialization and configurable timeouts, making it both efficient and easy to integrate.
It supports:
Flow
The database connection is managed automatically and closes itself after a configurable timeout to minimize resource usage.
dependencies {
implementation("io.github.raku2412:komoji:<version>")
}Android requires initialization before any database access:
class App : Application() {
override fun onCreate() {
super.onCreate()
Komoji.initialize(this)
}
}If initialization is missing, ContextNotProvidedException will be thrown.
iOS and JVM do not require initialization.
val emojis = Komoji.getAllEmojis()val results = Komoji.searchEmojis(
query = "smile"
)val emoji = Komoji.getEmojiByUnicode("😀")val emoji = Komoji.getEmojiById(1)Emoji names and keywords can be loaded in different languages.
val emojis = Komoji.getAllEmojis(
language = "de",
metadata = setOf(
EmojiMetadataType.NAME,
EmojiMetadataType.KEYWORDS
)
)Available languages:
val languages = Komoji.getAllLanguages()val groups = Komoji.getAllGroups(
includeSubgroups = true
)Emoji variants (e.g. skin tones) can be attached via metadata:
val emoji = Komoji.getEmojiByUnicode(
unicode = "👍",
metadata = setOf(EmojiMetadataType.VARIANTS)
)Komoji supports reactive searching with Kotlin Flow.
val results = Komoji.searchEmojis(
query = searchFlow,
language = "en",
metadata = setOf(
EmojiMetadataType.NAME,
EmojiMetadataType.KEYWORDS
)
)Komoji automatically:
Default timeout: 5 minutes
Custom timeout:
Komoji.configureTimeout(30.seconds)| Feature | Supported |
|---|---|
| Emoji search | ✅ |
| Localized metadata | ✅ |
| Emoji groups | ✅ |
| Emoji variants | ✅ |
| Reactive Flow API | ✅ |
| Android | ✅ |
| iOS | ✅ |
| JVM | ✅ |
MIT License (see here).
Komoji is a combination of Kotlin and Emoji — a Kotlin Multiplatform library designed to provide fast, localized, and fully offline access to Unicode emoji data.
Built around a lightweight SQLite database, Komoji offers powerful emoji search, multilingual metadata, emoji grouping, variant support, and reactive APIs for Android, iOS, and JVM applications. The library manages its database connection automatically with lazy initialization and configurable timeouts, making it both efficient and easy to integrate.
It supports:
Flow
The database connection is managed automatically and closes itself after a configurable timeout to minimize resource usage.
dependencies {
implementation("io.github.raku2412:komoji:<version>")
}Android requires initialization before any database access:
class App : Application() {
override fun onCreate() {
super.onCreate()
Komoji.initialize(this)
}
}If initialization is missing, ContextNotProvidedException will be thrown.
iOS and JVM do not require initialization.
val emojis = Komoji.getAllEmojis()val results = Komoji.searchEmojis(
query = "smile"
)val emoji = Komoji.getEmojiByUnicode("😀")val emoji = Komoji.getEmojiById(1)Emoji names and keywords can be loaded in different languages.
val emojis = Komoji.getAllEmojis(
language = "de",
metadata = setOf(
EmojiMetadataType.NAME,
EmojiMetadataType.KEYWORDS
)
)Available languages:
val languages = Komoji.getAllLanguages()val groups = Komoji.getAllGroups(
includeSubgroups = true
)Emoji variants (e.g. skin tones) can be attached via metadata:
val emoji = Komoji.getEmojiByUnicode(
unicode = "👍",
metadata = setOf(EmojiMetadataType.VARIANTS)
)Komoji supports reactive searching with Kotlin Flow.
val results = Komoji.searchEmojis(
query = searchFlow,
language = "en",
metadata = setOf(
EmojiMetadataType.NAME,
EmojiMetadataType.KEYWORDS
)
)Komoji automatically:
Default timeout: 5 minutes
Custom timeout:
Komoji.configureTimeout(30.seconds)| Feature | Supported |
|---|---|
| Emoji search | ✅ |
| Localized metadata | ✅ |
| Emoji groups | ✅ |
| Emoji variants | ✅ |
| Reactive Flow API | ✅ |
| Android | ✅ |
| iOS | ✅ |
| JVM | ✅ |
MIT License (see here).