Android quickstart

Last updated  Aug 4, 2026

Add the Maven repository, configure the SDK once at launch, implement one delegate, and present the assistant from any button.

Install the SDK

The SDK ships as a binary from a public, token-free Maven repository. Add the repository, then the dependency.

settings.gradle.kts
dependencyResolutionManagement {    repositories {        google()        mavenCentral()        // Voqal SDK — public, binary-only Maven repo (no token required).        maven { url = uri("https://raw.githubusercontent.com/VoqalAI/voqal-android-maven/main") }    }}
app/build.gradle.kts
dependencies {    implementation("ai.voqal:voqal-sdk:2.0.0")}

Configure at launch

Call VoqalSDK.setup once in your Application. Calling prewarm right after opens the engine connection in the background so the first turn skips a cold handshake.

App.kt
import android.app.Applicationimport ai.voqal.sdk.*class App : Application() {    val voqalDelegate = VoqalCredentials(authStore)    override fun onCreate() {        super.onCreate()        VoqalSDK.setup(            VoqalConfiguration(                requestId = "prod-yourapp",            // "prod-" / "stg-"                apiKey = "pk_live_…",                  // sent as X-Voqal-Key                theme = VoqalTheme(accent = "#2d5bff", appearance = VoqalTheme.Appearance.AUTO),            )        )        VoqalSDK.prewarm(voqalDelegate)   // warm the engine at launch    }}
requestId selects the environment by prefix: prod- routes to production, stg- to staging.

Implement the delegate

VoqalDelegate supplies credentials live — the SDK reads the token on every request, so always return one that is currently valid.

VoqalCredentials.kt
import ai.voqal.sdk.VoqalDelegateclass VoqalCredentials(private val authStore: AuthStore) : VoqalDelegate {    // Read live on every request — always hand back a current token.    override fun getToken(): String = authStore.currentToken    // Optional JSON: country, user id — drives region and personalization.    override fun getMetadata(): String? =        """{"country_code":"EGY","user_id":"285"}"""    override fun onUploadResult(result: String) {}   // recording lifecycle    override fun onError(error: Throwable) {}}

Present the assistant

Open the assistant from any of your own buttons — Views or Compose.

MainActivity.kt
// From any Activity — Views:assistantButton.setOnClickListener {    VoqalSDK.present(this, (application as App).voqalDelegate)}// Or from Compose:Button(onClick = { VoqalSDK.present(activity, delegate) }) { Text("Talk to Voqal") }
  • Voice, transcription, widgets, and confirmations are handled inside the sheet — your app ships no assistant UI.
  • Theming, presentation style, header branding, and the action button share one model across platforms — see Configuration.
© 2026 VoqalVoqal SDK & engine documentation