Skip to main content

Overview

Open Mushaf Native uses Expo Application Services (EAS) for Android builds. You can build locally or in the cloud, and submit to Google Play Store’s internal testing or production tracks.

Prerequisites

1

Install EAS CLI

npm install -g eas-cli
2

Login to Expo

eas login
3

Configure Project

Ensure your app.json has the correct Android configuration:
{
  "expo": {
    "android": {
      "package": "com.adelpro.openmushafnative",
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "edgeToEdgeEnabled": true,
      "jsEngine": "hermes",
      "playStoreUrl": "https://play.google.com/store/apps/details?id=com.adelpro.openmushafnative"
    }
  }
}

Build Profiles

The project uses two build profiles defined in eas.json:

Preview Profile

Builds an APK for internal testing and distribution:
"preview": {
  "android": {
    "buildType": "apk",
    "distribution": "internal",
    "resourceClass": "medium",
    "image": "latest"
  },
  "channel": "preview"
}

Production Profile

Builds an AAB (Android App Bundle) for Play Store submission:
"production": {
  "android": {
    "buildType": "app-bundle",
    "resourceClass": "medium",
    "image": "latest"
  },
  "channel": "production",
  "autoIncrement": true
}

Building for Android

Cloud Builds

yarn android:build:preview
# or
eas build -p android --profile preview

Local Builds

For faster builds without using EAS cloud resources:
yarn android:build:preview:local
# Outputs to: builds/app-preview.apk
Local builds require Android Studio and all necessary build tools installed on your machine.

Play Store Submission

Internal Testing Track

Submit the latest production build to internal testing:
yarn android:submit:internal
# or
eas submit -p android --profile internal --latest

Production Track

Submit a specific AAB file to production:
yarn android:submit:production
# or
eas submit -p android --profile production --path builds/app-production.aab

Combined Build and Submit

yarn android:build-submit:internal:local
# Builds production AAB locally, then submits to internal testing

Development Builds

For local development and testing:
yarn android
# or
expo run:android -d
The -d flag automatically selects a connected device or emulator.

Build Optimizations

The app includes the following optimizations configured in app.json:
  • Hermes Engine: Enabled for better performance
  • ProGuard: Enabled in release builds for code shrinking
  • Resource Shrinking: Removes unused resources from the final APK/AAB
  • New Architecture: React Native’s new architecture is enabled
{
  "expo": {
    "newArchEnabled": true,
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "enableProguardInReleaseBuilds": true,
            "enableShrinkResourcesInReleaseBuilds": true
          }
        }
      ]
    ]
  }
}
The app supports Android App Links for deep linking:
"intentFilters": [
  {
    "action": "VIEW",
    "data": {
      "scheme": "https",
      "host": "quran.us.kg",
      "pathPrefix": "/"
    },
    "category": ["BROWSABLE", "DEFAULT"],
    "autoVerify": true
  }
]

Troubleshooting

Build Failures

  1. Clear the build cache:
    eas build:clear-cache -p android
    
  2. Check your credentials:
    eas credentials
    

Local Build Issues

  1. Clean the prebuild folder:
    yarn prebuild
    
  2. Ensure Android SDK is properly configured:
    yarn doctor
    

Build docs developers (and LLMs) love