📄
Sunbird Saral
  • Sunbird Saral Overview
  • Saral Quick Guide
  • Saral Implementation Manual
    • OMR led scanning - Assessments
    • OCR led scanning - Admissions
  • Saral Transformation Story
  • LEARN
    • Software Requirement
    • Application Architecture
    • Features
      • Configurable Branding
      • Capture AI/ML Training Data
      • Support
      • Share App data
      • Auto Sync
      • Multi-Page support
      • Profile Menu
      • Dynamic Validations
      • Dynamic Tagging
      • Minimal Mode
      • Offline mode
      • App Force Update
      • Review results/marks
      • Firebase Analytics and Crashlytics
      • ML model deployment using Firebase
      • Improved Low light Performance - Manual Edit
      • Vertical Forms Scanning Support
      • Improve Processing Speed for big layouts
      • Admissions Data Capture
      • Securing PII Data Capture - Admissions
    • Specifications
      • Layout specification
      • Backend API Swagger Doc
    • Videos
      • Feature Explanation
        • OMR Layout scanning
        • Auto-Sync
        • Share scan app data
        • Skip feature
        • Support feature
        • Validation feature
        • Incorrect scanning
        • Multi-page feature
        • Branding feature
        • Offline mode
        • Review results/marks
      • Usage by States
        • Gujarat Implementation - Between 39:00 - 40:00 mins
        • Uttar Pradesh(U.P) , Gorakhpur Implementation
    • ML Model Accuracy/Results
  • USE
    • Roadmap
    • Workspace Setup - Playbook
    • Saral App Reference Backend
    • Generating APK from source code
    • Generate AAB(App bundle) from source code
    • Sign already generated APK file with private Key
    • Layout configuration
    • Debug/Run Saral App from Android Studio
    • Saral App Debug Tips
    • Saral App Usage Guidelines
    • Update BASE_URL,apkURL in APK
    • Update BASE_URL,apkURL in AAB
    • Sign already generated AAB(Android App Bundle) file with private key
    • Google Play Store App Publish Considerations
    • Layout Design Guidelines
    • Saral OCR Assets
    • Firebase setup for Saral App Telemetry
    • Firebase setup for TFLite model deployment
    • Alternatives for Saral components
  • ENGAGE
    • Source Code Repository
    • Saral SDK Source Code Repository
    • Tracker
    • Releases
      • v1.0.0-beta.1
      • v1.0.0-beta.2
      • v1.0.0-beta.3
      • v1.0.0-beta.4
      • v1.0.0-beta5
      • v1.5.0
      • v1.5.1
      • v1.5.2
      • v1.5.3
      • v1.5.4
      • v1.5.5
      • v1.5.6
      • v1.5.7
      • v1.5.9
      • v1.6.0
      • v1.6.1
      • v1.6.2
      • v1.7.0
    • Saral - Solution Providers
    • Discuss
  • Experience Saral
  • Dev Environment - Installation & Maintenance
    • Saral Installation Guide (Non-Prod)
    • Saral - Sandbox Maintenance Guide (Non-Prod)
  • Saral Easy Installer
    • Saral Production-Environment User Installation Guide
      • Manual Installation for Prod
      • Automating the Infra provisioning and install of the Saral application
        • Prerequisites
        • What automation does
        • Run installer
        • Post install steps
        • Monitoring-Stack
    • Reference Documents
      • SARAL Infra Requirements & Associated Cost
      • Saral Infra Cost Benefit Analysis
  • Tool for Saral Easy Layout generation and Auto generate ROI json
Powered by GitBook
On this page
  • Source Code references
  • Saral v1.0 Android App bundling/packaging

Was this helpful?

Edit on GitHub
  1. USE

Generate AAB(App bundle) from source code

Steps how to generate ABB from source code

PreviousGenerating APK from source codeNextSign already generated APK file with private Key

Last updated 2 years ago

Was this helpful?

Source Code references

Open Terminal and clone source code git clone https://github.com/Sunbird-Saral/Project-Saral.git

ReferSource Code Repositoryfor latest repository location.

Change Directory to Project-Saral/ folder and switch to release tag as per release notes. git checkout tags/<tag_name>

$FRONTEND_FOLDER = Project-Saral/v1.0/frontend

$BACKEND_FOLDER = Project-Saral/v1.0/backend

Saral v1.0 Android App bundling/packaging

  1. Follow Frontend Setup steps @ Workspace Setup - Playbook

  2. Implementing Saral App for specific purpose , its recommended to change default package com.saralapp references to implementation specific package for example com.saralapp.xxstate for xxstate. Refer below screenshot.

  3. App Icon can be customised/replaced by generating App icon using standard icon editors and replace icons in below folders.

    • $FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-mdpi

    • $FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-hdpi

    • $FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xhdpi

    • $FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xxhdpi

    • $FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xxxhdpi

  4. Open Terminal in /SaralApp/android folder

./gradlew clean

MYAPP_RELEASE_STORE_FILE=my-upload-key.keystore

MYAPP_RELEASE_STORE_PASSWORD=changeit

MYAPP_RELEASE_KEY_ALIAS=hwrecog-key-alias

MYAPP_RELEASE_KEY_PASSWORD=changeit

Note: Make sure signingConfig signingConfigs.release the line is uncommented.

    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

             // Optional, specify signing versions used
               v1SigningEnabled true
               v2SigningEnabled true
         }
     }
         debug {
             storeFile file('debug.keystore')
             storePassword 'android'
             keyAlias 'androiddebugkey'
             keyPassword 'android'
         }
     }

    buildTypes {
        debug {
            signingConfig signingConfigs.release
        }
        release {
            signingConfig signingConfigs.release
            /* These are optional params to shrink the app size*/
            shrinkResources enableProguardInReleaseBuilds
            zipAlignEnabled enableProguardInReleaseBuilds
            useProguard enableProguardInReleaseBuilds

            minifyEnabled enableProguardInReleaseBuilds
            minifyEnabled true
            shrinkResources true
            /* These are optional params to shrink the app size*/
                        
            debug {
                debuggable true
            }
        }
    }

./gradlew bundleRelease

(OR)

./gradlew bundleDebug

  1. You can find the release .aab file in Project-Saral/v1.0/frontend/SaralApp/android/app/build/outputs/bundle/release or debug folder.

Note: If releasing AAB file for a client/implementation, recommended creating a sub-branch(say v1.0.0-beta.1-up-apk) from release tag and modify implementation-specific Base URL.

jarsigner -verbose -verify ./app/build/outputs/apk/release/app-release.aab

AAB file can't be used for installation and testing directly. Its for publishing to playstore. Once AAB file is generated , use below command to generate universal APK for installation and testing before publishing to Google play-store.

  1. java -jar <bundletool-all-1.10.0.jar> build-apks --bundle=app-release.aab --output=app-release.apks --mode=universal --ks=keystore.jks --ks-pass=pass:your_keystore_password --ks-key-alias=your_key_alias --key-pass=pass:your_key_password

AAB Signing can be enabled using the below Gradle files. Make sure the Keystore file is to be used for signing placed in /SaralApp/android/app folder.

/SaralApp/android/gradle.properties

/SaralApp/android/app/build.gradle

Update google-services.json file in /SaralApp/android/app folder.

Edit /SaralApp/src/config/config.js to change apkVersionId , apkURL, BASE_URL as per the implementation.

Open Terminal in /SaralApp/android folder

Open terminal from /SaralApp/android folder and execute the below command to verify if AAB signature.

Download Bundletool from

Bundle Tool Releases
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER