This repository contains the Android TWA (Trusted Web Activity) build tooling for SC Market.
This repository uses Bubblewrap to build the SC Market PWA into an Android app for the Google Play Store.
- Node.js (v16+)
- Java Development Kit (JDK 11+)
- Android SDK (via Android Studio or command-line tools)
- Google Play Developer Account (for publishing)
-
Install dependencies:
npm install
-
Set up signing key (first time only):
keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -keysize 2048 -validity 10000
-
Build the app:
npm run twa:build
-
Install on device:
npm run twa:install
npm run twa:init- Initialize TWA project (first time setup)npm run twa:update- Update TWA project with latest manifestnpm run twa:build- Build Android APKnpm run twa:validate- Validate TWA configurationnpm run twa:doctor- Check Bubblewrap setupnpm run twa:install- Install APK on connected devicenpm run twa:assetlinks- Generate Digital Asset Links filenpm run twa:icon-bg- Generate icons with backgroundnpm run twa:icons- Generate Android icons with proper safe zone paddingnpm run twa:splash- Generate splash screen with logo and textnpm run twa:fingerprint- Get SHA-256 fingerprint from keystorenpm run twa:open- Open app on connected device
Edit twa-manifest.json to configure:
- Package ID
- App version
- Icons and splash screens
- Shortcuts
- Other TWA settings
-
Update version in
twa-manifest.json:- Increment
appVersionCode - Update
appVersionName
- Increment
-
Build App Bundle:
npm run twa:build cd twa ./gradlew bundleRelease -
Sign the bundle (if not auto-signed):
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../android.keystore twa/app/build/outputs/bundle/release/app-release.aab android
-
Upload to Play Console
The app requires Digital Asset Links to be configured on the production server. See docs/DIGITAL_ASSET_LINKS.md for details.
sc-market-android/
├── README.md
├── package.json
├── twa-manifest.json # Main TWA configuration (required at root)
├── .gitignore
├── gradle.properties # Gradle build configuration
├── manifest-checksum.txt # Generated by Bubblewrap (tracks manifest changes)
├── assets/ # Static assets (optional)
│ └── store_icon.png # Play Store icon (if needed)
├── scripts/ # Build and utility scripts
│ ├── generate-assetlinks.sh
│ ├── generate-icon-with-bg.sh
│ ├── get-fingerprint.sh
│ └── open-app.sh
└── docs/ # Documentation
├── DIGITAL_ASSET_LINKS.md
└── DEPLOYMENT.md
docs/DIGITAL_ASSET_LINKS.md- Digital Asset Links setupdocs/DEPLOYMENT.md- Play Store deployment guide
android.keystore file contains your app signing key. Keep it secure and never commit it to version control. If lost, you cannot update your app on the Play Store.
- Main Frontend: scmarket/sc-market-frontend