Android SDK — cloud.newinstance:liveandaichat

Native Kotlin chat SDK with a full Jetpack Compose UI.

Install (Maven Central): implementation("cloud.newinstance:liveandaichat:0.1.1") · minSdk 24 · JDK 17.

val chat = LiveAndAiChat.Builder(context)
    .config(LiveAndAiChatConfig(apiKey = "sk_live_abc123"))   // widget key ID only — never keyId:secret
    .user(ChatUser(name = "Ada", email = "ada@example.com", externalId = "usr_123"))
    .build()

Show the UI with the Compose ChatScreen(chat) or launch the bundled ChatActivity.

Auth: publishable widget key (bare key ID). The config rejects/strips any keyId:secret value — the secret must never ship in an app. Server-side, widget keys are clamped to chat operations only.

Transport: talks to https://service.newinstance.cloud (baked-in default) — realtime via SSE (/graphql/stream) with WebSocket fallback (/graphql/ws), automatic backoff, network monitoring and an attachment upload queue.