Skip to main content

Overview

This guide covers building release APKs and deploying the DPM Delivery Mobile app to the Google Play Store.

Prerequisites

  • Android Studio installed
  • JDK 11 or higher
  • Android SDK with build tools
  • Keystore file for signing (for production builds)

Build Configuration

Package Information

  • Package Name: com.felixasante.dpmparceldeliveryapp
  • App Name: dpm-parcel-delivery-app
  • Version: 1.0.0

Adaptive Icon Configuration

The app uses adaptive icons with the following configuration:
"adaptiveIcon": {
  "backgroundColor": "#E6F4FE",
  "foregroundImage": "./src/assets/images/android-icon-foreground.png",
  "backgroundImage": "./src/assets/images/android-icon-background.png",
  "monochromeImage": "./src/assets/images/android-icon-monochrome.png"
}

Permissions

The app requires the following permissions:
  • android.permission.RECORD_AUDIO

Building Release APK

Generate Release APK

Use the npm script to build a release APK:
npm run generate-apk
This command runs:
cd android && ./gradlew assembleRelease -x lintVitalAnalyzeRelease
The APK will be generated at:
android/app/build/outputs/apk/release/app-release.apk

View Generated APK

To open the output directory:
npm run view:apk

Gradle Configuration

Build Variants

The project uses Gradle for building. Key build configurations:
  • New Architecture: Enabled (newArchEnabled: true)
  • Edge-to-Edge: Enabled for modern UI experience
  • Predictive Back Gesture: Disabled

Build Types

Debug Build:
cd android && ./gradlew assembleDebug
Release Build:
cd android && ./gradlew assembleRelease

Code Signing Setup

Generate Keystore

Create a keystore for signing your release builds:
keytool -genkeypair -v -storetype PKCS12 -keystore dpm-delivery.keystore \
  -alias dpm-delivery-key -keyalg RSA -keysize 2048 -validity 10000

Configure Signing in Gradle

Edit android/app/build.gradle to add signing configuration:
android {
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
        }
    }
}

Store Credentials Securely

Create android/gradle.properties (add to .gitignore):
MYAPP_RELEASE_STORE_FILE=dpm-delivery.keystore
MYAPP_RELEASE_KEY_ALIAS=dpm-delivery-key
MYAPP_RELEASE_STORE_PASSWORD=your_keystore_password
MYAPP_RELEASE_KEY_PASSWORD=your_key_password

Google Play Store Deployment

Prepare for Submission

  1. Create App Listing
    • Go to Google Play Console
    • Create a new application
    • Use package name: com.felixasante.dpmparceldeliveryapp
  2. App Information
    • App name: DPM Parcel Delivery
    • Short description and full description
    • Screenshots (phone and tablet)
    • Feature graphic (1024 x 500)
    • App icon (512 x 512)
  3. Content Rating
    • Complete the content rating questionnaire
    • Get your app rated for all territories
  4. Pricing & Distribution
    • Set pricing (free/paid)
    • Select countries for distribution
    • Review content guidelines

Upload Release

  1. Create Release
    • Navigate to Production > Releases
    • Create new release
    • Upload the signed APK or AAB
  2. Release Notes
    • Add release notes for this version
    • Support multiple languages if needed
  3. Review and Rollout
    • Review all information
    • Submit for review
    • Roll out to production once approved
Google Play prefers AAB format:
cd android && ./gradlew bundleRelease
The AAB will be generated at:
android/app/build/outputs/bundle/release/app-release.aab

Testing

Internal Testing

  1. Create an internal testing track in Play Console
  2. Upload your APK/AAB
  3. Add internal testers (email addresses)
  4. Share the opt-in link with testers

Closed Testing

  1. Create a closed testing track
  2. Define tester lists or use Google Groups
  3. Roll out to closed testers for feedback

Open Testing

Make your app available to open testers before production release.

Troubleshooting

Build Fails

Clean and rebuild:
cd android && ./gradlew clean
npm run generate-apk
Check Java version:
java -version

Signing Issues

  • Verify keystore path in gradle.properties
  • Ensure passwords are correct
  • Check keystore validity: keytool -list -v -keystore dpm-delivery.keystore

Upload Errors

  • Ensure version code is incremented in android/app/build.gradle
  • Verify package name matches Play Console
  • Check minimum SDK version meets Play Store requirements

Continuous Integration

GitHub Actions Example

name: Build Android Release

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Set up JDK 11
        uses: actions/setup-java@v3
        with:
          java-version: '11'
          distribution: 'temurin'
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'
      
      - name: Install dependencies
        run: npm ci
      
      - name: Build Release APK
        run: npm run generate-apk
        env:
          MYAPP_RELEASE_STORE_FILE: ${{ secrets.RELEASE_KEYSTORE }}
          MYAPP_RELEASE_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
          MYAPP_RELEASE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
          MYAPP_RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
      
      - name: Upload APK
        uses: actions/upload-artifact@v3
        with:
          name: app-release.apk
          path: android/app/build/outputs/apk/release/app-release.apk

Next Steps

  • Set up automated build pipelines
  • Configure Play Store listing
  • Implement app signing by Google Play
  • Set up release tracks (alpha, beta, production)
  • Monitor crash reports via Play Console

Build docs developers (and LLMs) love