androidengineers.Book a session

Session ownership and the AI boundary

PocketCook course study guide

article15–20 min

One app, three ways to learn

The roadmap orders the concepts, these articles explain the engineering decisions, and the codelab makes them observable in PocketCook. Work from the same source revision throughout. This is a text-based course built around a completed native app, not a video course or an empty-project walkthrough. You will inspect the implementation, enable voice, run experiments, make a tested change and complete an independent extension.

Allow roughly 12–16 hours including a 4–6 hour codelab and capstone. This is a study estimate, not measured completion time. Familiarity with Kotlin, Compose, StateFlow and coroutine cancellation is required; the course teaches PCM and realtime session concepts as you need them. PocketCards is useful background but Firebase setup is not a prerequisite.

Your reproducible baseline

The Android source is pinned to 60d86c93a4ff1674f7cdba077ed995b6a1cd3903. Use Git, Android Studio, JDK 17, SDK 36 and Build Tools 36.0.0. Minimum Android is API 26. Prefer a physical phone for real voice evaluation and an isolated emulator for the full instrumented suite.

git clone https://github.com/AndroidEngineers/android-ai-cookbook.git
cd android-ai-cookbook
git switch -c learning/pocketcook 60d86c93a4ff1674f7cdba077ed995b6a1cd3903
cd gemini-live
./gradlew :app:assembleDebug :app:testDebugUnitTest

Open gemini-live/ in Android Studio, not the repository root. Configure ANDROID_HOME or your ignored local.properties SDK path. On Windows use gradlew.bat. First dependency resolution needs a network. If the revision cannot be fetched, verify upstream availability; do not silently switch to main and assume the explanations still match.

Learning sequence

ModuleCodelab workEvidence to keep
Session ownershipMeet the app, clone, run offline, inspect setupSequence diagram and setup-gating test
Microphone inputCompute PCM sizes; run fragmentation testsSample-order evidence and queue-duration calculation
Speaker outputTrace partial writes and playback progressExplanation of the no-voice deadlock and device result
Interruption and muteRun epoch tests and live turn experimentsEvent timeline and explicitly labeled live observations
Recovery and boundariesBackground, restart and update recipe contextProgress behavior; credential clearing; tool design
EvaluationRun the task matrix and document limitationsSanitized results, timings and failure analysis
CapstoneMake a tested improvement and independent extensionCode diff, test output and final self-assessment

Complete each practice assignment after its lesson. The codelab's chunk-size exercise includes a deliberate failing test and a minimal fix. Code excerpts in articles are for reading unless labeled as an edit; do not paste partial methods over entire files.

What the core does and does not do

It implements local recipes, manual steps, progress persistence, direct voice setup, PCM capture/playback, transcripts, mute/end and explicit restart. Debug credentials are runtime-only and cleared on background. Camera, timer tools, automatic navigation, session resumption and production token issuance are not implemented. Release voice is unavailable. Later design sections are labeled accordingly.

Evidence over completion ticks

Keep a learning log with revision, hypothesis, command/action, expected result, actual result and source method responsible. The baseline has unit and device tests plus author-reported live success. Your own device, route and model still need evaluation. If cloud access is unavailable, complete the deterministic work and label live tasks unverified; finishing the reading does not erase that gap.

Do not publish keys, raw microphone buffers or incidental conversation transcripts. A short app-only demo can show the user flow with consent, while test output documents deterministic behavior. Use the final assessment to explain why those are complementary forms of evidence.

Course study guide · Hands-on codelab · Pinned Android source

YOUR LEARNING JOURNEY

0 of 16 available lessons completed

Progress saved in this browser. No account needed.
PocketCook course study guide | Gemini Live for Android with PocketCook | Android Engineers