
XMPP SDK offering modular RFC/XEP support, transport adapters (WebSocket/TCP), typed feature policy, IM features, Docker-backed interop tests; OMEMO end-to-end encryption planned.
🚧 This project is under active development. 🚧
🛡️ Security layer (OMEMO / end-to-end encryption) is coming soon. 🛡️
❌ Do not use this SDK in production yet. ❌
🔒 Without the security layer, communications are NOT encrypted and are unsafe for real-world use.
Kotlin Multiplatform XMPP SDK for Android, iOS, and JVM/Desktop, with modular RFC/XEP support and Docker-backed interop tests.
KmpXMPP is published as separate modules. Add only what you use.
dependencies {
implementation("io.github.androidpoet:kmpxmpp-core:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-client:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-im:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-websocket:0.1.0-alpha01")
// Optional XEPs:
implementation("io.github.androidpoet:kmpxmpp-xep-0184-receipts:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-xep-0333-chat-markers:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-xep-0085-chat-states:0.1.0-alpha01")
}kmpxmpp-core, kmpxmpp-client, kmpxmpp-stream, kmpxmpp-transport, kmpxmpp-xml
kmpxmpp-security, kmpxmpp-sasl, kmpxmpp-sm, kmpxmpp-reconnect
kmpxmpp-websocket (KMP/Ktor), kmpxmpp-tcp (JVM TCP adapter)kmpxmpp-im, kmpxmpp-xep-* extension moduleskmpxmpp-omemo-core, kmpxmpp-omemo-persistence-sqlite, kmpxmpp-xep-0384-omemo
kmpxmpp-interop-tests, kmpxmpp-sample-whatsapp-jvm
import io.github.androidpoet.kmpxmpp.client.DefaultKmpXmppClient
import io.github.androidpoet.kmpxmpp.core.Jid
import io.github.androidpoet.kmpxmpp.core.onFailure
import io.github.androidpoet.kmpxmpp.core.onSuccess
import io.github.androidpoet.kmpxmpp.im.DefaultXmppMessageService
import io.github.androidpoet.kmpxmpp.stream.XmppSessionConfig
import io.github.androidpoet.kmpxmpp.stream.XmppSessionOrchestrator
import io.github.androidpoet.kmpxmpp.websocket.createWebSocketXmppTransport
import kotlinx.coroutines.runBlocking
fun main(): Unit = runBlocking {
val host = "chat.example.com"
val port = 443
val me = Jid(local = "alice", domain = host, resource = "android")
val peer = Jid(local = "bob", domain = host)
// For production keep secure=true and tlsInitiallyActive=true.
val transport = createWebSocketXmppTransport(path = "/xmpp-websocket", secure = true)
val orchestrator = XmppSessionOrchestrator(
config = XmppSessionConfig(
host = host,
port = port,
tlsInitiallyActive = true,
),
transport = transport,
)
val client = DefaultKmpXmppClient(streamEngine = orchestrator, transport = transport)
val chat = DefaultXmppMessageService(client)
client.connect()
.onFailure { error("connect failed: ${it.message}") }
client.authenticate(me, "strong-password")
.onFailure { error("auth failed: ${it.message}") }
chat.sendChatMessage(peer, "hello from kmpxmpp")
.onFailure { error("send failed: ${it.message}") }
.onSuccess { println("message sent to ${peer.asBareJid()}") }
client.disconnect()
.onFailure { error("disconnect failed: ${it.message}") }
}Build:
./gradlew buildDocker-backed interop:
KMPXMPP_RUN_DOCKER_E2E=true ./gradlew :kmpxmpp-interop-tests:jvmDockerE2eFull release gate:
./gradlew productionVerify --no-daemon --stacktraceSample WhatsApp-style desktop flow:
./gradlew :kmpxmpp-sample-whatsapp-jvm:runkmpxmpp-websocket (Ktor-based KMP transport).kmpxmpp-tcp is a JVM transport adapter and not required for mobile-only apps.kmpxmpp-core includes typed feature IDs and policy gates:
XmppFeatureIdXmppFeaturePolicy (StableOnly, AllowExperimental, AllowDeferred, AllowDeprecated, AllowAll)XmppCapabilityRegistryXmppFeatureCatalogUse StableOnly in production to avoid accidental activation of non-stable modules.
alpha, keep OMEMO marked as evolving, and keep productionVerify required in CI.Detailed checklist: docs/PRODUCTION_READINESS.md.
🚧 This project is under active development. 🚧
🛡️ Security layer (OMEMO / end-to-end encryption) is coming soon. 🛡️
❌ Do not use this SDK in production yet. ❌
🔒 Without the security layer, communications are NOT encrypted and are unsafe for real-world use.
Kotlin Multiplatform XMPP SDK for Android, iOS, and JVM/Desktop, with modular RFC/XEP support and Docker-backed interop tests.
KmpXMPP is published as separate modules. Add only what you use.
dependencies {
implementation("io.github.androidpoet:kmpxmpp-core:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-client:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-im:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-websocket:0.1.0-alpha01")
// Optional XEPs:
implementation("io.github.androidpoet:kmpxmpp-xep-0184-receipts:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-xep-0333-chat-markers:0.1.0-alpha01")
implementation("io.github.androidpoet:kmpxmpp-xep-0085-chat-states:0.1.0-alpha01")
}kmpxmpp-core, kmpxmpp-client, kmpxmpp-stream, kmpxmpp-transport, kmpxmpp-xml
kmpxmpp-security, kmpxmpp-sasl, kmpxmpp-sm, kmpxmpp-reconnect
kmpxmpp-websocket (KMP/Ktor), kmpxmpp-tcp (JVM TCP adapter)kmpxmpp-im, kmpxmpp-xep-* extension moduleskmpxmpp-omemo-core, kmpxmpp-omemo-persistence-sqlite, kmpxmpp-xep-0384-omemo
kmpxmpp-interop-tests, kmpxmpp-sample-whatsapp-jvm
import io.github.androidpoet.kmpxmpp.client.DefaultKmpXmppClient
import io.github.androidpoet.kmpxmpp.core.Jid
import io.github.androidpoet.kmpxmpp.core.onFailure
import io.github.androidpoet.kmpxmpp.core.onSuccess
import io.github.androidpoet.kmpxmpp.im.DefaultXmppMessageService
import io.github.androidpoet.kmpxmpp.stream.XmppSessionConfig
import io.github.androidpoet.kmpxmpp.stream.XmppSessionOrchestrator
import io.github.androidpoet.kmpxmpp.websocket.createWebSocketXmppTransport
import kotlinx.coroutines.runBlocking
fun main(): Unit = runBlocking {
val host = "chat.example.com"
val port = 443
val me = Jid(local = "alice", domain = host, resource = "android")
val peer = Jid(local = "bob", domain = host)
// For production keep secure=true and tlsInitiallyActive=true.
val transport = createWebSocketXmppTransport(path = "/xmpp-websocket", secure = true)
val orchestrator = XmppSessionOrchestrator(
config = XmppSessionConfig(
host = host,
port = port,
tlsInitiallyActive = true,
),
transport = transport,
)
val client = DefaultKmpXmppClient(streamEngine = orchestrator, transport = transport)
val chat = DefaultXmppMessageService(client)
client.connect()
.onFailure { error("connect failed: ${it.message}") }
client.authenticate(me, "strong-password")
.onFailure { error("auth failed: ${it.message}") }
chat.sendChatMessage(peer, "hello from kmpxmpp")
.onFailure { error("send failed: ${it.message}") }
.onSuccess { println("message sent to ${peer.asBareJid()}") }
client.disconnect()
.onFailure { error("disconnect failed: ${it.message}") }
}Build:
./gradlew buildDocker-backed interop:
KMPXMPP_RUN_DOCKER_E2E=true ./gradlew :kmpxmpp-interop-tests:jvmDockerE2eFull release gate:
./gradlew productionVerify --no-daemon --stacktraceSample WhatsApp-style desktop flow:
./gradlew :kmpxmpp-sample-whatsapp-jvm:runkmpxmpp-websocket (Ktor-based KMP transport).kmpxmpp-tcp is a JVM transport adapter and not required for mobile-only apps.kmpxmpp-core includes typed feature IDs and policy gates:
XmppFeatureIdXmppFeaturePolicy (StableOnly, AllowExperimental, AllowDeferred, AllowDeprecated, AllowAll)XmppCapabilityRegistryXmppFeatureCatalogUse StableOnly in production to avoid accidental activation of non-stable modules.
alpha, keep OMEMO marked as evolving, and keep productionVerify required in CI.Detailed checklist: docs/PRODUCTION_READINESS.md.