diff --git a/.github/workflows/fork-release.yml b/.github/workflows/fork-release.yml index 768ff6f519207..0915cb8b17732 100644 --- a/.github/workflows/fork-release.yml +++ b/.github/workflows/fork-release.yml @@ -373,6 +373,7 @@ jobs: echo "T3CODE_MOBILE_UPDATES_ENABLED=0" echo "T3CODE_MOBILE_VERSION=$VERSION" echo "T3CODE_ANDROID_ICON_BACKGROUND=./assets/android-icon-background-ember.png" + echo "T3CODE_ANDROID_SPLASH_ICON=./assets/android-splash-icon-ember.png" echo "T3CODE_ANDROID_PACKAGE=$ANDROID_PACKAGE" echo "T3CODE_APP_NAME=$APP_NAME" } >> .env diff --git a/FORK.md b/FORK.md index eaf50b1f23549..2cf539e1571e0 100644 --- a/FORK.md +++ b/FORK.md @@ -68,7 +68,7 @@ adds the feature, and remove it in the PR that drops the feature. - #21 Open in VS Code and other SSH editor links use the host the client reached directly when sshd is listening, instead of the server's first advertised host: `apps/web/src/remoteOpen.ts`, `apps/server/src/environment/RemoteOpenTargets.ts` (`sshd`). -- #32 The Android APK is the fork's own app: an ember icon, plus the package name, app name, release +- #32 The Android APK is the fork's own app: an ember icon and splash screen, plus the package name, app name, release keystore and Firebase config from repository variables and secrets when they are set: `apps/mobile/app.config.ts` (`T3CODE_ANDROID_PACKAGE`), `.github/workflows/fork-release.yml`. - #45 A server started with an FCM service account key is the push host: it sends the diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts index 394c10ee937d5..eca699324c355 100644 --- a/apps/mobile/app.config.ts +++ b/apps/mobile/app.config.ts @@ -129,6 +129,8 @@ const appName = repoEnv.T3CODE_APP_NAME?.trim() || variant.appName; const androidPackage = repoEnv.T3CODE_ANDROID_PACKAGE?.trim() || variant.androidPackage; const androidAdaptiveBackgroundImage = repoEnv.T3CODE_ANDROID_ICON_BACKGROUND?.trim() || variant.assets.androidAdaptiveBackgroundImage; +const androidSplashIcon = + repoEnv.T3CODE_ANDROID_SPLASH_ICON?.trim() || variant.assets.androidSplashIcon; if (!/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)+$/.test(androidPackage)) { throw new Error( "T3CODE_ANDROID_PACKAGE must be an Android package name such as com.example.t3code.", @@ -386,8 +388,8 @@ const config: ExpoConfig = { shortcut_icon: { foregroundImage: variant.assets.androidAdaptiveForeground, backgroundColor: variant.assets.androidAdaptiveBackgroundColor, - ...(variant.assets.androidAdaptiveBackgroundImage - ? { backgroundImage: variant.assets.androidAdaptiveBackgroundImage } + ...(androidAdaptiveBackgroundImage + ? { backgroundImage: androidAdaptiveBackgroundImage } : {}), }, }, @@ -433,9 +435,9 @@ const config: ExpoConfig = { }, android: { // Android 12+ masks the central two thirds of the 288dp canvas; adaptive layers avoid clipped corners. - image: variant.assets.androidSplashIcon, + image: androidSplashIcon, imageWidth: 288, - dark: { image: variant.assets.androidSplashIcon }, + dark: { image: androidSplashIcon }, }, }, ], diff --git a/apps/mobile/assets/android-splash-icon-ember.png b/apps/mobile/assets/android-splash-icon-ember.png new file mode 100644 index 0000000000000..939614a49339e Binary files /dev/null and b/apps/mobile/assets/android-splash-icon-ember.png differ