en un clic
take-and-update-screenshots
// Capture the four RakuRaku showcase screenshots on a connected device and refresh the fastlane metadata. Use when the user asks to take, update, or regenerate screenshots.
// Capture the four RakuRaku showcase screenshots on a connected device and refresh the fastlane metadata. Use when the user asks to take, update, or regenerate screenshots.
Release engineering tasks for RakuRaku IME — version bumping, building release APKs, tagging, and creating GitHub releases. Use when the user asks to prepare a release, bump version, tag, or build for distribution.
Commit code changes and push via Git. Use when the user asks to commit, push, or save their work to the repository.
Review code for quality, correctness, and security vulnerabilities. Use when the user asks to review code, audit for security issues, or check for bugs and anti-patterns.
Writing/updating project documentation for RakuRaku IME (README, TODOs, LICENSE notices, AI-assistant guide files). Use when the user asks to update docs or rewrite user-facing text.
| name | take-and-update-screenshots |
| description | Capture the four RakuRaku showcase screenshots on a connected device and refresh the fastlane metadata. Use when the user asks to take, update, or regenerate screenshots. |
You are refreshing the showcase screenshots for RakuRaku IME (輕鬆輸入法):
01_settings.png — MainActivity (settings screen)02_ez_keyboard.png — EZ Chinese keyboard03_english_keyboard.png — English keyboard04_emoji_keyboard.png — Emoji pickerAll four are produced by a single Gradle task, which runs once per locale (en-US, then zh-Hant-TW):
cmd locale set-app-locales <pkg> --locales <tag> (API 33+), then
am force-stop so the next launch comes up under the new
Configuration,KeyboardScreenshotTest,app/build/reports/screenshots/screenshots/,fastlane/metadata/android/<locale>/images/phoneScreenshots/
folder under the existing 01_…–04_… filenames.After both locales are captured, the task clears the override
(--locales "") so the app falls back to the device locale on the
developer's emulator.
The task uses adb shell am instrument rather than
connectedAndroidTest so the app is not uninstalled after the run —
otherwise the app's external-files dir (where screenshots land) gets
wiped before we can pull them.
Per-app locale switching avoids a zygote restart, so the whole per-locale cycle completes in well under a minute (a recent clean run took 44 s end-to-end).
adb devices
shows exactly one entry in device state).@Before wakes the device
and dismisses the keyguard, but a lockscreen password cannot be
bypassed — ask the user to unlock first if needed.adb shell cmd locale set-app-locales, so the caller doesn't need
to pre-configure anything. The device needs to be API 33+ for
cmd locale to exist — the current project emulator runs
API 36, so this is non-issue in practice.adb devices and confirm exactly one is
connected and authorised. If not, stop and ask the user../gradlew :app:screenshotKeyboard
For each locale (en-US, then zh-Hant-TW) this: installs the app +
test APK (idempotent), pushes persist.sys.locale, restarts
zygote, waits for boot, runs the test, pulls the PNGs, and copies
them into the matching fastlane/metadata/android/<locale>/…
folder. Takes ~2–3 minutes total.fastlane/metadata/android/en-US/images/phoneScreenshots/01_settings.png
and fastlane/metadata/android/zh-TW/images/phoneScreenshots/01_settings.png)
to confirm they aren't blank/black (sleeping screen), caught
mid-animation ("Preparing dictionary…" splash), or stuck with the
previous locale's strings. If they look wrong, ask the user to
wake/unlock the device and re-run — don't blindly commit.git status
git diff --stat fastlane/metadata/
Expect four modified PNGs per locale directory, with distinct file
sizes between the two folders (identical sizes = the locale switch
silently no-op'd).commit-and-push yourself — the user usually reviews the new
screenshots visually in Android Studio's Git tool before committing.KeyboardScreenshotTest.captureShowcaseScreenshots.adb shell settings get secure default_input_method and re-run.adb pull fails with "No such file or directory" → the app was
uninstalled before the pull. That means someone ran
connectedAndroidTest instead of screenshotKeyboard; use the
task.adb shell settings put system system_locales en-US (requires a
process/device restart to take effect on system chrome), re-run the
task, and copy only to en-US/.