Skip to content

SC-Market/sc-market-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SC Market Android Build

This repository contains the Android TWA (Trusted Web Activity) build tooling for SC Market.

Overview

This repository uses Bubblewrap to build the SC Market PWA into an Android app for the Google Play Store.

Prerequisites

  • Node.js (v16+)
  • Java Development Kit (JDK 11+)
  • Android SDK (via Android Studio or command-line tools)
  • Google Play Developer Account (for publishing)

Quick Start

  1. Install dependencies:

    npm install
  2. Set up signing key (first time only):

    keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -keysize 2048 -validity 10000
  3. Build the app:

    npm run twa:build
  4. Install on device:

    npm run twa:install

Available Scripts

  • npm run twa:init - Initialize TWA project (first time setup)
  • npm run twa:update - Update TWA project with latest manifest
  • npm run twa:build - Build Android APK
  • npm run twa:validate - Validate TWA configuration
  • npm run twa:doctor - Check Bubblewrap setup
  • npm run twa:install - Install APK on connected device
  • npm run twa:assetlinks - Generate Digital Asset Links file
  • npm run twa:icon-bg - Generate icons with background
  • npm run twa:icons - Generate Android icons with proper safe zone padding
  • npm run twa:splash - Generate splash screen with logo and text
  • npm run twa:fingerprint - Get SHA-256 fingerprint from keystore
  • npm run twa:open - Open app on connected device

Configuration

Edit twa-manifest.json to configure:

  • Package ID
  • App version
  • Icons and splash screens
  • Shortcuts
  • Other TWA settings

Building for Play Store

  1. Update version in twa-manifest.json:

    • Increment appVersionCode
    • Update appVersionName
  2. Build App Bundle:

    npm run twa:build
    cd twa
    ./gradlew bundleRelease
  3. 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
  4. Upload to Play Console

Digital Asset Links

The app requires Digital Asset Links to be configured on the production server. See docs/DIGITAL_ASSET_LINKS.md for details.

Repository Structure

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

Documentation

  • docs/DIGITAL_ASSET_LINKS.md - Digital Asset Links setup
  • docs/DEPLOYMENT.md - Play Store deployment guide

Security

⚠️ Important: The 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.

Related Repositories

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages