Skip to content

Generate Play Store screenshots on Gradle managed devices - #279

Open
yukuku wants to merge 3 commits into
developfrom
claude/screenshot-automation
Open

yukuku wants to merge 3 commits into
developfrom
claude/screenshot-automation

Conversation

@yukuku

@yukuku yukuku commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Replaces the Play Store screenshots with generated ones, and adds the machinery that generates them.

Why

The screenshots on the store were roughly a decade old (Nexus 5 / Nexus 9 frames running Android 5/6 chrome) and below Play's current requirements:

Before Play wants Now
Phone 576x1024, 7 shots, 2 of them landscape composites ≥1080px short edge, long edge ≤ 2x short 1080x1920, 8 shots, all portrait
Tablet 7" 1024x576, 4 shots documented range 1080-7680px 2048x1536, 8 shots
Tablet 10" 1024x576, 1 shot at least 4 2048x1536, 8 shots

Quick Bible had graphics for en-US only; all eight of its listing languages now have their own.

How

StoreScreenshotTest reaches each screen by launching its activity through an intent rather than tapping through the drawer. Tapping would mean matching on-screen text, which changes in every language the capture runs in.

ScreenshotSeed fills the content each screen reads, because most of them are empty on a fresh install:

Screen Seeded with
Reader, highlights, notes Markers on Psalm 23 and John 3:16
Devotions Today's article — Renungan Pagi for Indonesian flavors, Morning & Evening otherwise
Reading plan The M'Cheyne plan from an .rpb fixture, first five days ticked
Songs Four public-domain hymns in a book named "Hymns"

The devotion has to carry today's date, because the activity opens on today and would start a download for any other day. Seeding clears first, so repeat runs do not accumulate duplicates.

Audio is the exception: it needs sets fetched from the server rather than rows in the database. That shot taps the reader's audio button, matching on its view id so it works in every language, and waits for playback. The frame ends up showing real playback with the follow-along verse highlight — a feature not one of the ten store listings currently mentions. Without network the button is absent, the tap is skipped, and the shot falls back to the plain reader rather than failing the run.

Every listing language comes off a single device. The app's language is its own pref_language setting, independent of the device locale, so the test writes that preference and launches the next activity. Quick Bible's eight listings are two emulator runs, not sixteen.

tools/screenshots/capture.py drives the whole thing and files results into Alkitab/src/<flavor>/play/listings/<language>/graphics/, where tools/play/publish.py push picks them up:

ALKITAB_PROPRIETARY_DIR=/path/to/proprietary \
  python3 tools/screenshots/capture.py --flavor yuku_quick_bible

Two build fixes that fell out of this

  • Production debug variants were broken. copyProprietaryGoogleServices<Flavor> writes into src/<flavor>/, and only the release path ordered it before resource generation, via its validate<Variant>FirebaseConfig task. Any yuku_alkitabDebug build therefore failed Gradle's implicit-dependency check. The copy now hangs off pre<Variant>Build, which covers every consumer.
  • Managed devices need a GPU setting. The full aosp images reject AGP's default -gpu auto-no-window, so gradle.properties sets android.testoptions.manageddevices.emulator.gpu. The smaller aosp-atd images boot without it but have no rendering stack, and every screenshot taken on one is solid black.

Verified

Ran end to end for both flavors. 216 screenshots, every one checked against Play's rules by script — all at least 1080px on the short edge, none exceeding a 2:1 ratio, 8 per bucket, zero violations. Content spot-checked across languages: Indonesian reader with seeded highlights, Korean marker list, Russian reading plan, Indonesian devotional, audio bar mid-playback. testPlainDebugUnitTest, testPlainReleaseUnitTest and assemblePlainDebug all pass.

Not included

Framing and captions, so the tablet captures still show the emulator taskbar along the bottom. Split-screen version comparison is not captured: it needs a second version installed, which the bundled internal version cannot provide. The reading plan fixture is an English-titled ESV plan, so the plan name stays English in a localized capture (the daily readings inside it do localize). The listing text problems from the same review (no listing mentions the audio Bible, contradictory version counts, leftover Traditional characters in zh-CN) are a separate branch.

🤖 Generated with Claude Code

Store screenshots were roughly a decade out of date (Nexus 5 and Nexus 9
frames running Android 5/6 chrome) and below Play's current floor: phone
shots at 576x1024 against a 1080px minimum, tablet shots at 1024x576 under
the documented 1080-7680 range, one 10-inch shot where Play wants four, and
two landscape composites sitting inside an otherwise portrait phone set.

StoreScreenshotTest reaches each screen by launching its activity rather
than tapping through the drawer, which would mean matching on-screen text in
every language captured. ScreenshotSeed populates markers first so the
reader shows highlights, a bookmark and a note on Psalm 23.

Every listing language comes off one device: the app's language is its own
pref_language setting, independent of the device locale, so the test writes
that preference between shots. Quick Bible's eight listings are two emulator
runs rather than sixteen.

tools/screenshots/capture.py drives it and files the results into the play/
metadata. Captured: 24 images for Alkitab, 192 for Quick Bible, at 1080x1920
and 2048x1536.

Two build fixes came out of this. Production debug variants never ordered
copyProprietaryGoogleServices<Flavor> before resource generation, which only
release got via its validate task, so any yuku_alkitabDebug build failed
Gradle's implicit-dependency check; the copy now hangs off preBuild. And
managed devices need a GPU setting in gradle.properties because the full
aosp images reject AGP's default -gpu auto-no-window, while the aosp-atd
images AGP would otherwise suggest have no rendering stack and produce solid
black frames.

Framing and captions are not part of this, so the tablet captures still
include the emulator taskbar. Devotions, songs, reading plans and audio need
downloaded content and are not captured yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📱 Preview builds

Signed release builds of 01fe002 — version 5.0.0-dev.8 (23608910) — from this run.

Flavor Application ID APK
Alkitab yuku.alkitab Download (8.3 MB)
Quick Bible yuku.alkitab.kjv Download (8.1 MB)
Sabda Alkitab org.sabda.alkitab Download (8.3 MB)

Or open https://1c3ef304-alkitab-pr.yukuku.workers.dev on an Android device.

These share their application IDs and signature with the Play Store builds, so installing one replaces the corresponding installed app (data is kept).

This comment tracks the latest build for this PR; earlier builds keep their own URLs.

yukuku and others added 2 commits September 8, 2026 22:07
The four screens that need downloaded content were skipped, which left the
store set showing only Bible reading and markers. All four are now captured.

ScreenshotSeed fills the content the screens read: today's devotional
article (Renungan Pagi for Indonesian flavors, Morning & Evening for the
rest), the M'Cheyne plan from an rpb fixture in the test assets with its
first five days ticked, and four public-domain hymns in a book named
"Hymns". The devotion has to carry today's date, because the activity opens
on today and would start a download for any other day.

Audio is the exception, since it needs sets fetched from the server rather
than rows in the database. That shot taps the reader's audio button and
waits for playback, matching on the view id so it works in every language.
The frame ends up showing real playback with the follow-along verse
highlight. Without network the button is absent, the tap is skipped, and the
shot falls back to the plain reader rather than failing the run.

Thirteen screens are now captured and the eight Play accepts are filed:
reader, audio, versions, search, highlights, devotion, reading plan, songs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A capture command written for the previous commit's docs used a real home
directory, and it reached a pull request description on this public repo
before anyone noticed. A published PR description cannot be taken back, so
the rule is worth stating rather than remembering.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yukuku
yukuku force-pushed the claude/screenshot-automation branch from 075d4be to 01fe002 Compare September 8, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant