androidengineers.Book a session

Streaming playback and device progress

Practice: Diagnose silence without guessing

exercise30–60 min

Goal and prerequisites

Read the companion lesson and use the pinned PocketCook checkout. Work in your own learning branch. This exercise combines source reading with observable behavior; do not edit production credentials or upload conversations.

Source to inspect

audio/AndroidPcmAudio.kt and AudioPlaybackTest.kt. Kotlin files live under app/src/main/java/com/androidengineers/pocketcook/; unit tests under app/src/test/java/com/androidengineers/pocketcook/, device tests under app/src/androidTest/java/com/androidengineers/pocketcook/.

Predict, run, explain

Draw the dependency cycle created by waiting for the first small chunk to drain before feeding another. Identify the write loop and the independent playback observer in the fixed implementation. On a test emulator run the device suite, then explain why a silent PCM test can establish progress without establishing audible speech.

ANDROID_SERIAL=emulator-5556 ./gradlew :app:connectedDebugAndroidTest

Run commands from gemini-live/. Record the source revision, prediction, result and explanation. A test failing to compile is a setup problem, not the expected behavioral failure. If the device or provider is unavailable, state which checks remain unverified.

Reference reasoning and submission

Replace the example serial with your own from adb devices. The instrumented suite uses an isolated test app and the UI tests reset its recipe progress; use a test device. Expected reasoning: the startup threshold may need more than the first chunk, so the writer must continue feeding. turnComplete is not a device drain event. Deliver a timeline and the measured playback-head result, labeling this as platform evidence rather than a cloud test.

Self-check

Can another learner reproduce your result from your branch and notes? Can you name the responsible source method without reading the lesson? Have you separated local tests from actual device/provider evidence? Revisit the corresponding concept if any answer is no.

Return to the lesson.

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.
Practice: Diagnose silence without guessing | Gemini Live for Android with PocketCook | Android Engineers