From ab8fef3e77309b69a5d1cda19d7c1a4ee3ea3120 Mon Sep 17 00:00:00 2001 From: Max Heimbrock <43608204+MaxHeimbrock@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:25:47 +0200 Subject: [PATCH 1/3] Bump to livekit-lib 2.28.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index da033ec..8a612df 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-toolin androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-material3 = { group = "androidx.compose.material3", name = "material3" } -livekit-lib = { group = "io.livekit", name = "livekit-android", version = "2.27.0" } +livekit-lib = { group = "io.livekit", name = "livekit-android", version = "2.28.0" } livekit-components = { group = "io.livekit", name = "livekit-android-compose-components", version = "2.4.1" } gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } From 18902c5f7f703dc7583e1b58f1660dc8b386b217 Mon Sep 17 00:00:00 2001 From: Max Heimbrock <43608204+MaxHeimbrock@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:25:30 +0200 Subject: [PATCH 2/3] Bump livekit android components to 2.4.2 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8a612df..bb1efe5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-man androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-material3 = { group = "androidx.compose.material3", name = "material3" } livekit-lib = { group = "io.livekit", name = "livekit-android", version = "2.28.0" } -livekit-components = { group = "io.livekit", name = "livekit-android-compose-components", version = "2.4.1" } +livekit-components = { group = "io.livekit", name = "livekit-android-compose-components", version = "2.4.2" } gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } timberkt = { module = "com.github.ajalt:timberkt", version.ref = "timberkt" } From edd552bf7f3541b9135b9456b0baeb937df5e3be Mon Sep 17 00:00:00 2001 From: Max Heimbrock <43608204+MaxHeimbrock@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:37:39 +0200 Subject: [PATCH 3/3] Exchanging deprecated Sandbox to DevelopmentTokenSource --- .env.example | 2 +- README.md | 4 ++-- .../io/livekit/android/example/voiceassistant/TokenExt.kt | 4 ++-- .../android/example/voiceassistant/screen/ConnectScreen.kt | 4 ++-- .../example/voiceassistant/screen/VoiceAssistantScreen.kt | 2 +- .../voiceassistant/viewmodel/VoiceAssistantViewModel.kt | 6 +++--- taskfile.yaml | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.env.example b/.env.example index ce17e08..6420064 100644 --- a/.env.example +++ b/.env.example @@ -1 +1 @@ -LIVEKIT_SANDBOX_ID="" \ No newline at end of file +LIVEKIT_SANDBOX_ID="" diff --git a/README.md b/README.md index 9e71734..a22a203 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,12 @@ The app is configured to connect to the LiveKit homepage agent by default, which To switch from the default agent to your own, you first need a LiveKit agent to speak with. For a no-code setup, use the [Agent Builder](https://docs.livekit.io/agents/start/builder/). For more customization, try our starter agent for [Python](https://github.com/livekit-examples/agent-starter-python), [Node.js](https://github.com/livekit-examples/agent-starter-node), or [create your own from scratch](https://docs.livekit.io/agents/start/voice-ai/). -Second, you need a token server. For development, the easiest option is the sandbox token server: enable it from your project's Options on the Settings page in LiveKit Cloud and copy the sandboxId. +Second, you need a token server. For development, the easiest option is the development token server. Read our [docs](https://docs.livekit.io/frontends/build/authentication/development-token-server/) on how to activate it for you project. Then edit `TokenExt.kt`: ```kotlin -const val sandboxID = "your sandbox id" +const val tokenServerId = "your token server id" ``` ## Token generation diff --git a/app/src/main/java/io/livekit/android/example/voiceassistant/TokenExt.kt b/app/src/main/java/io/livekit/android/example/voiceassistant/TokenExt.kt index 5f4f7bb..e0d80c4 100644 --- a/app/src/main/java/io/livekit/android/example/voiceassistant/TokenExt.kt +++ b/app/src/main/java/io/livekit/android/example/voiceassistant/TokenExt.kt @@ -1,7 +1,7 @@ package io.livekit.android.example.voiceassistant -// TODO: Add your Sandbox ID here -const val sandboxID = "" +// TODO: Add your Token Server ID here +const val tokenServerId = "" // NOTE: If you prefer not to use the token server for testing, you can generate your // tokens manually by visiting https://cloud.livekit.io/projects/p_/settings/keys diff --git a/app/src/main/java/io/livekit/android/example/voiceassistant/screen/ConnectScreen.kt b/app/src/main/java/io/livekit/android/example/voiceassistant/screen/ConnectScreen.kt index e3f5e90..e68a6fe 100644 --- a/app/src/main/java/io/livekit/android/example/voiceassistant/screen/ConnectScreen.kt +++ b/app/src/main/java/io/livekit/android/example/voiceassistant/screen/ConnectScreen.kt @@ -41,7 +41,7 @@ import io.livekit.android.example.voiceassistant.R import io.livekit.android.example.voiceassistant.hardcodedToken import io.livekit.android.example.voiceassistant.hardcodedUrl import io.livekit.android.example.voiceassistant.homepageAgentEndpoint -import io.livekit.android.example.voiceassistant.sandboxID +import io.livekit.android.example.voiceassistant.tokenServerId import io.livekit.android.example.voiceassistant.ui.theme.Blue500 import kotlinx.serialization.Serializable @@ -106,7 +106,7 @@ fun ConnectScreen( onClick = { // Token source details from TokenExt.kt val route = VoiceAssistantRoute( - sandboxId = sandboxID, + tokenServerId = tokenServerId, hardcodedUrl = hardcodedUrl, hardcodedToken = hardcodedToken, homepageAgentEndpoint = homepageAgentEndpoint diff --git a/app/src/main/java/io/livekit/android/example/voiceassistant/screen/VoiceAssistantScreen.kt b/app/src/main/java/io/livekit/android/example/voiceassistant/screen/VoiceAssistantScreen.kt index 3115944..231b6e9 100644 --- a/app/src/main/java/io/livekit/android/example/voiceassistant/screen/VoiceAssistantScreen.kt +++ b/app/src/main/java/io/livekit/android/example/voiceassistant/screen/VoiceAssistantScreen.kt @@ -69,7 +69,7 @@ import kotlinx.serialization.Serializable @Serializable data class VoiceAssistantRoute( - val sandboxId: String, + val tokenServerId: String, val hardcodedUrl: String, val hardcodedToken: String, val homepageAgentEndpoint: String diff --git a/app/src/main/java/io/livekit/android/example/voiceassistant/viewmodel/VoiceAssistantViewModel.kt b/app/src/main/java/io/livekit/android/example/voiceassistant/viewmodel/VoiceAssistantViewModel.kt index 2dd9a51..4fa023d 100644 --- a/app/src/main/java/io/livekit/android/example/voiceassistant/viewmodel/VoiceAssistantViewModel.kt +++ b/app/src/main/java/io/livekit/android/example/voiceassistant/viewmodel/VoiceAssistantViewModel.kt @@ -21,10 +21,10 @@ class VoiceAssistantViewModel(application: Application, savedStateHandle: SavedS val tokenSource: TokenSource init { - val (sandboxId, url, token, homepageAgentEndpoint) = savedStateHandle.toRoute() + val (tokenServerId, url, token, homepageAgentEndpoint) = savedStateHandle.toRoute() - tokenSource = if (sandboxId.isNotEmpty()) { - TokenSource.fromSandboxTokenServer(sandboxId = sandboxId) + tokenSource = if (tokenServerId.isNotEmpty()) { + TokenSource.fromDevelopmentTokenServer(tokenServerId = tokenServerId) } else if (url.isNotEmpty() && token.isNotEmpty()) { TokenSource.fromLiteral(url, token) } else { diff --git a/taskfile.yaml b/taskfile.yaml index 91e8884..1a23cc4 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -7,11 +7,11 @@ tasks: vars: TOKEN_FILE: "app/src/main/java/io/livekit/android/example/voiceassistant/TokenExt.kt" cmds: - - echo -e "Setting up sandbox..." + - echo -e "Setting up token server..." - platforms: [darwin] - cmd: sed -i "" "s/sandboxID = \"\"/sandboxID = \"{{.LIVEKIT_SANDBOX_ID}}\"/g" "{{.ROOT_DIR}}/{{.TOKEN_FILE}}" + cmd: sed -i "" "s/tokenServerId = \"\"/tokenServerId = \"{{.LIVEKIT_SANDBOX_ID}}\"/g" "{{.ROOT_DIR}}/{{.TOKEN_FILE}}" - platforms: [linux, windows] - cmd: sed -i "s/sandboxID = \"\"/sandboxID = \"{{.LIVEKIT_SANDBOX_ID}}\"/g" "{{.ROOT_DIR}}/{{.TOKEN_FILE}}" + cmd: sed -i "s/tokenServerId = \"\"/tokenServerId = \"{{.LIVEKIT_SANDBOX_ID}}\"/g" "{{.ROOT_DIR}}/{{.TOKEN_FILE}}" - echo -e "\nYour Android agent example project is ready to go!\n" - echo -e "To give it a try, open the project in Android Studio and run the app." - echo -e "\nFor more help view your project's README.md file or join our Slack community at https://livekit.io/join-slack."