Skip to main content

Quick start

How to set up the development environment

Execute the following steps to bootstrap your development environment. At the end of the tutorial, you'll run the whitelabel Deltatre App within an Android device emulator.

1. Create and clone your repository from the d3studio template

  1. Visit your organization's GitHub page.

  2. Click on the New button to create a repository.

  3. Choose d3studio-android-template from the Repository template dropdown.

  1. Enter a Repository name, add a Description, adjust visibility, then click Create repository.

  2. Open a terminal and clone the just created repository locally:

    git clone <repository-url>

2. Generate the GitHub PAT (Personal Access Token) token

  1. Navigate to GitHub Developer Settings**

  2. Configure Token Settings

    • Name the token (e.g., "CI/CD Token").
    • Set an expiration date (recommended for security).
    • Select the necessary permissions (scopes):
      • repo → Full repository access
      • workflow → GitHub Actions access
      • admin:org → Organization management
      • read:packages / write:packages → For GitHub Packages
  3. Authorize the token for your organization.

  4. Generate and store the Token

    • Click "Generate token".
    • Copy and store the token securely (you won’t be able to see it again after closing the page).

3. Setup the local.properties file

Create the local.properties file is this position:

MyAndroidProject/
├── app/
├── build.gradle
├── settings.gradle
├── local.properties <-- This file

Set credentials like in the example below (replace my-github-pattoken with the PAT token you generated in step 2.):

## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
sdk.dir=/Users/user.name/Library/Android/sdk
github.usr=my-github-username
github.key=my-github-pattoken

4. Add the google-services.json file

Download the google-services.json file after registering your app in the Firebase console.

The google-services.json configuration looks like:

{
"project_info": {
"project_number": "****",
"project_id": "my-project-id",
"storage_bucket": "my-project-id.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "******",
"android_client_info": {
"package_name": "com.deltatre.d3studiotemplate"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "*****"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

As a package name, use either the default com.deltatre.d3studiotemplate or the one you set up in the Playstore.

Put the google-services.json file in this position:

app/
├── src/
├── build.gradle (Module: app)
├── google-services.json <-- Place here

5. Build and run

  1. Open a Terminal window and ensure that the Android SDK location is in yout system PATH:

    echo 'export ANDROID_HOME=$HOME/AndroidSDK' >> ~/.bashrc
    echo 'export ANDROID_SDK_ROOT=$HOME/AndroidSDK' >> ~/.bashrc
    echo 'export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools' >> ~/.bashrc
    source ~/.bashrc
  2. Move to the root directory of your Android project:

    cd /path/to/your/android/project
  3. Check if the Android SDK path is correctly set up in local.properties. If not, you can set it manually:

    export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk # macOS/Linux

    export ANDROID_SDK_ROOT=C:\Users\your-user\AppData\Local\Android\Sdk # Windows

    To verify, run:

    $ANDROID_SDK_ROOT/platform-tools/adb version
  4. If you don’t have a physical device connected, start your my_emulator Android emulator:

    emulator -avd my_emulator

    To list available AVDs:

    emulator -list-avds
  5. Check if a device or emulator is connected:

    adb devices

If you see a device listed, you’re good to go.

  1. Run a Gradle clean to remove old build files:

    ./gradlew clean
  2. Compile the project with:

    ./gradlew assembleDebug # For a debug build

    For a release build:

    ./gradlew assembleRelease
  3. Once the build is successful, install the APK:

    adb install app/build/outputs/apk/voltCoreQa/debug/app-voltCore-qa-debug.apk

    For a release build:

    adb install app/build/outputs/apk/voltCoreQa/debug/app-voltCore-prod-debug.apk
  4. Launch the installed app on the device:

    adb shell am start -n com.yourpackage.name/.MobileMainActivity

    Replace com.yourpackage.name with your actual app package name (found in AndroidManifest.xml).

  5. To see logs and debug output:

    adb logcat

You have successfully built and run the bootstrap app. Well done!

Was this page helpful?