android: generate release screenshots · openclaw/openclaw@f3ab59d
joshavant
·
2026-06-17
·
via Recent Commits to openclaw:main
File tree
main/java/ai/openclaw/app
test/java/ai/openclaw/app
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,6 +53,12 @@ pnpm android:version:pin -- --from-gateway
|
53 | 53 | pnpm android:version:pin -- --version 2026.6.5 --version-code 2026060501 |
54 | 54 | ``` |
55 | 55 | |
| 56 | +Generate raw Google Play screenshots: |
| 57 | + |
| 58 | +```bash |
| 59 | +pnpm android:screenshots |
| 60 | +``` |
| 61 | + |
56 | 62 | `pnpm android:release:archive` builds signed release artifacts into `apps/android/build/release-artifacts/` and writes `.sha256` checksum files: |
57 | 63 | |
58 | 64 | - Play build: `openclaw-<version>-play-release.aab` |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -30,8 +30,9 @@ pnpm android:version:pin -- --version 2026.6.5 --version-code 2026060501
|
30 | 30 | 1. Pin Android to the intended release version. |
31 | 31 | 2. Run `pnpm android:version:sync`. |
32 | 32 | 3. Update `apps/android/fastlane/metadata/android/en-US/release_notes.txt`. |
33 | | -4. Run `pnpm android:release:archive` to produce the signed Play AAB and third-party APK. |
34 | | -5. Run `pnpm android:release:upload` to upload metadata and the Play AAB to Google Play internal testing. |
35 | | -6. Promote to production manually in Google Play Console. |
| 33 | +4. Run `pnpm android:screenshots` to refresh raw Google Play screenshots. |
| 34 | +5. Run `pnpm android:release:archive` to produce the signed Play AAB and third-party APK. |
| 35 | +6. Run `pnpm android:release:upload` to upload metadata, screenshots, and the Play AAB to Google Play internal testing. |
| 36 | +7. Promote to production manually in Google Play Console. |
36 | 37 | |
37 | 38 | The third-party flavor is archived as a signed APK for non-Play distribution. It is not uploaded by the Play release lane. |
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +package ai.openclaw.app |
| 2 | + |
| 3 | +import android.content.Intent |
| 4 | + |
| 5 | +const val extraAndroidScreenshotMode = "openclaw.screenshotMode" |
| 6 | +const val extraAndroidScreenshotScene = "openclaw.screenshotScene" |
| 7 | + |
| 8 | +enum class AndroidScreenshotScene( |
| 9 | +val rawValue: String, |
| 10 | +) { |
| 11 | +Connect("connect"), |
| 12 | +Chat("chat"), |
| 13 | +Voice("voice"), |
| 14 | +Screen("screen"), |
| 15 | +Settings("settings"), |
| 16 | + ; |
| 17 | + |
| 18 | +companion object { |
| 19 | +fun fromRawValue(raw: String?): AndroidScreenshotScene = entries.firstOrNull { it.rawValue == raw?.trim()?.lowercase() } ?: Connect |
| 20 | + } |
| 21 | +} |
| 22 | + |
| 23 | +fun parseAndroidScreenshotModeIntent(intent: Intent?): AndroidScreenshotScene? { |
| 24 | +if (intent?.getBooleanExtra(extraAndroidScreenshotMode, false) != true) { |
| 25 | +return null |
| 26 | + } |
| 27 | +return AndroidScreenshotScene.fromRawValue(intent.getStringExtra(extraAndroidScreenshotScene)) |
| 28 | +} |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | package ai.openclaw.app |
2 | 2 | |
| 3 | +import ai.openclaw.app.ui.AndroidScreenshotModeScreen |
3 | 4 | import ai.openclaw.app.ui.OpenClawTheme |
4 | 5 | import ai.openclaw.app.ui.RootScreen |
5 | 6 | import android.content.Intent |
@@ -51,6 +52,10 @@ class MainActivity : ComponentActivity() {
|
51 | 52 | pendingIntent = intent |
52 | 53 | WindowCompat.setDecorFitsSystemWindows(window, false) |
53 | 54 | permissionRequester = PermissionRequester(this) |
| 55 | + parseAndroidScreenshotModeIntent(intent)?.let { scene -> |
| 56 | + enterScreenshotMode(scene) |
| 57 | +return |
| 58 | + } |
54 | 59 | |
55 | 60 | setContent { |
56 | 61 | var activeViewModel by remember { mutableStateOf<MainViewModel?>(null) } |
@@ -79,6 +84,12 @@ class MainActivity : ComponentActivity() {
|
79 | 84 | } |
80 | 85 | } |
81 | 86 | |
| 87 | +private fun enterScreenshotMode(scene: AndroidScreenshotScene) { |
| 88 | + setContent { |
| 89 | +AndroidScreenshotModeScreen(scene = scene) |
| 90 | + } |
| 91 | + } |
| 92 | + |
82 | 93 | override fun onStart() { |
83 | 94 | super.onStart() |
84 | 95 | foreground = true |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。