androidengineers.Book a session

Evaluate offline generation

Evaluate offline generation

articleSelf-paced

Tests prove different things

The baseline has six policy tests, four ViewModel tests and seven downloader tests. UI tests cover model setup, the labeled sample and camera capture followed by reopening. These tests establish specific software behavior with controlled inputs. They do not measure model quality, native stop latency or airplane-mode inference.

Run the software gate before interpreting model failures:

./gradlew :app:testDebugUnitTest :app:lintDebug :app:assembleRelease
# With a selected emulator/device connected:
./gradlew :app:connectedDebugAndroidTest

Connected tests run on attached compatible devices; disconnect unrelated devices if you want one target. On a reused app installation, repeated camera tests can leave duplicate default-titled stories. Use an isolated test emulator or unique test titles rather than deleting personal app data.

Real-model protocol

After the correct model is installed, use three benign inputs: a mug, a key and a small toy, plus one text-only direction. Run each across two genres and retain whether inference started, first-text latency, completion time, output length and any error. Separate a first load from a later load that may benefit from caches. The adapter creates an engine per scene, so do not describe later runs as guaranteed warm persistent sessions.

Score each successful result 0–2 for object relevance, continuity with accepted scenes, genre fit, readable prose and fictional framing. Use explicit examples of each score, not only an average. Missing output is a runtime failure; fabricated object details are a quality failure. Both belong in the report.

Then enable airplane mode and start a new scene after confirming weights are installed. Check that generation works without network access; a previously saved story opening offline is not this test. Test Stop and Retry independently and observe that no text from the earlier attempt enters the new draft.

Privacy and reporting

Use synthetic or non-sensitive photos, avoid prompt logging, and verify backup rules before distribution. Do not promise encryption based on app-private directories. Publish device/model/settings with measurements and label every unrun case as unverified. Current author evidence does not include a successful real-phone story, memory/thermal benchmark or native cancellation timing.

Checkpoint

Submit a matrix with software tests, live output, offline output, stop/retry and measurements as separate rows. A learner without compatible hardware can complete software analysis and report a blocked inference track. Completion badges record learning activity, not device certification or a production-readiness guarantee.

Roadmap · Hands-on codelab · Pinned source

YOUR LEARNING JOURNEY

0 of 13 available lessons completed

Progress saved in this browser. No account needed.
Evaluate offline generation | Gemma on Android with PocketStories — Preview | Android Engineers