Skip to content

Latest commit

 

History

History
85 lines (62 loc) · 5.01 KB

File metadata and controls

85 lines (62 loc) · 5.01 KB

Android Marketing Screenshots

This document tracks repeatable Android screenshot scripts for marketing assets.

For the operational capture procedure, clean-emulator workflow, and verification checklist, use marketing-screenshot-runbook.md.

The locale-specific screenshot texts, file-name prefixes, and UI labels currently live in apps/android/app/src/androidTest/java/com/flashcardsopensourceapp/app/marketing/screenshots/MarketingScreenshotCatalog.kt. Screenshot-only translated app resources belong in apps/android/app/src/marketingScreenshot/res and are packaged only in the dedicated marketingScreenshot build type used by the wrapper scripts.

Current inventory

There is currently one supported Android manual capture flow and five expected generated output PNG targets. Existing repository media can still contain the previous split-run assets or older cards-list numbering until the unified generator is run and the regenerated PNGs are reviewed.

The screenshot catalog currently defines these locale prefixes:

  • en
  • en-US
  • ar
  • zh-CN
  • de-DE
  • hi-IN
  • ja-JP
  • ru-RU
  • es-419
  • es-ES
  • es-US

The unified screenshot flow captures an exam-prep concept card about opportunity cost and the seeded study history in five store states:

  • front-only before answer reveal

  • revealed answer with the rating buttons visible

  • progress screen with one deterministic 30-day-ish review history, streakDays = 8, hasReviewedToday = true, and activeReviewDays = 16

  • AI handoff screen with the handed-off card attached plus an unsent draft request

  • cards list with the shared opportunity-cost prompt pinned to the top

  • Manual screenshot entrypoint: apps/android/app/src/androidTest/java/com/flashcardsopensourceapp/app/marketing/screenshots/MarketingAllScreenshotsScript.kt

  • Manual guest cleanup entrypoint: apps/android/app/src/androidTest/java/com/flashcardsopensourceapp/app/marketing/screenshots/MarketingScreenshotGuestCleanupScript.kt

  • Shared screenshot helpers: apps/android/app/src/androidTest/java/com/flashcardsopensourceapp/app/marketing/screenshots/MarketingScreenshotTestSupport.kt

  • Supported manual wrapper script: scripts/android/capture-android-marketing-screenshots.sh

  • Expected generated output PNG targets:

    • apps/android/docs/media/play-store-screenshots/en-1_review-card-front-google-play-opportunity-cost.png
    • apps/android/docs/media/play-store-screenshots/en-2_review-card-result-google-play-opportunity-cost.png
    • apps/android/docs/media/play-store-screenshots/en-3_progress-google-play-study-history.png
    • apps/android/docs/media/play-store-screenshots/en-4_review-card-ai-draft-google-play-opportunity-cost.png
    • apps/android/docs/media/play-store-screenshots/en-5_cards-list-google-play-vocabulary.png

Run the flow

Prerequisites:

  • Start a local Android emulator or device on API 37.
  • For a local headless emulator, prefer emulator @Medium_Phone_API_37.0 -no-window -no-audio -gpu auto.
  • Run from the repository root.

Command:

bash scripts/android/capture-android-marketing-screenshots.sh

To target a configured locale other than the default en, set FLASHCARDS_MARKETING_LOCALE_PREFIX for the wrapper run:

FLASHCARDS_MARKETING_LOCALE_PREFIX=de-DE bash scripts/android/capture-android-marketing-screenshots.sh

These scripts are not part of Android CI, release gates, or default androidTest runs. They exist only to generate marketing screenshots on demand. They run :app:connectedMarketingScreenshotAndroidTest, not the normal debug instrumentation task, so screenshot-only translations do not affect the Play-first debug and release builds. The wrapper also runs a dedicated guest cleanup entrypoint before the screenshot flow and again from an exit trap after the wrapper finishes, including failure exits. The screenshot reset flow remains as an in-test defense: it deletes the guest cloud session remotely before it clears local screenshot state so the seeded guest workspace does not remain on the backend after the run.

The unified wrapper script runs one manual-only entrypoint, seeds one guest workspace, saves screenshots 1, 2, 3, 4, and 5 into /sdcard/Download/flashcards-marketing-screenshots/, and then pulls those files into the committed marketing media directory.

Pattern for future flows

Future marketing screenshot flows should follow the same structure:

  1. Add a dedicated manual screenshot entrypoint that creates or prepares the required in-app state.
  2. Drive the UI to the exact screen that marketing needs.
  3. Save the screenshot PNG or PNGs into /sdcard/Download/flashcards-marketing-screenshots/ from instrumentation.
  4. Add a small shell wrapper in scripts/android/ that runs just that manual entrypoint and pulls the generated PNG file or files into apps/android/docs/media/play-store-screenshots/.

This keeps screenshot generation deterministic, reviewable, runnable without manual emulator interaction, and fully separate from the normal Android test suite and shipping Play-first localization flow.