Cartesiandocs

Android SDK

Installation

Add the Cartesian Android SDK to your Gradle build.

Requirements

Minimum
AndroidAPI 24 (Android 7.0), compileSdk 36
Kotlin2.1 (the SDK is compiled against Kotlin 2.1 APIs)
Java bytecode11
Jetpack ComposeCompose BOM 2026.06 (Compose 1.11) for cartesian-ui

Add the dependency

dependencies {
    // Full UI kit, which includes cartesian-core
    implementation("ai.cogitx.cartesian:cartesian-ui:0.1.0")

    // Or headless only: no Compose, no Android UI
    // implementation("ai.cogitx.cartesian:cartesian-core:0.1.0")
}

The SDK is published to Maven Central, which every Android project already includes, so you don't need to add a repository or credentials. Versions start at 0.1.0. Until the first release is out, publish it locally from the Cartesian repo with ./gradlew publishToMavenLocal in sdk/android and add mavenLocal() to your repositories.

What the SDK adds to your app

The cartesian-ui manifest merges these entries into your app:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />  <!-- voice input, asked at runtime -->

<queries>
    <intent><action android:name="android.speech.RecognitionService" /></intent>
    <intent><action android:name="android.speech.action.RECOGNIZE_SPEECH" /></intent>
</queries>

<activity android:name="ai.cogitx.cartesian.ui.CartesianChatActivity" android:exported="false" />
xml

If you turn voice off with CartesianFeatures.voice(false), you can also remove the microphone permission:

AndroidManifest.xml
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />

Dependencies the SDK brings

  • OkHttp 5 for REST and WebSocket. You can pass your own client with CartesianConfig.Builder.okHttpClient(...).
  • kotlinx-coroutines and kotlinx-serialization-json.
  • Compose Foundation, but no Material. The UI is drawn with Foundation only, so it does not inherit or conflict with your Material theme.

All resources are prefixed cartesian_, so they won't clash with yours. Consumer R8 rules ship inside the AAR, so you don't need to add keep rules.