Skip to main content

CourierSampleApp

System Requirements

This document mandates adherence to the Android Application Development Environment 
Setup Guide, as a prerequisite for system compliance.

By following these steps, you should have a consistent and well-configured development environment for your Android application on Windows 10/11. Remember to restart your system after making changes related to CMake in Android Studio and after updating Environment Variables.

drawing-7-1708568602.png

Project Structure

CourierSampleApp is using the Android Gradle Plugin Version 8.9.1+ with Gradle Version 8.11.1. The
Application is tested with ndk 28.0.13004108 that can be installed from the document in chapter Configuration and System Requirements. The supported API range is 31-36. The supported ABIs are arm64-v8a, x86_64, x86. The CourierSampleApp Android Application is NOT using the NativeView library.

Building and Running the Android Application

To be able to build and run the Android Application, the following steps must be done.

1. CGI Studio

These steps are required to prepare the asset from the solution to use in the CMake and Android Studio steps.

  1. Subst [windows-commands/subst] the root of CGI Studio.
    • Open a Command Prompt in the root of CGI Studio directory e.g., “...\cgistudio” and type: “subst
      x: .” and click enter. The CGI root is now available under the subst "x" drive in Windows Explorer.
  2. Run CGI Studio by double clicking on “X:\bin\SceneComposer\SceneComposer_Android_OpenGLES30.bat”,
  3. Open the following solution for CourierSampleApp from X:\cgi_studio_courier_apps\src\CourierSampleApp\SCSolution\Android\Solution.scs”.
  4. Save this solution as:
    1. AssetLibCff_Android_Target.bin and then copy it into the /sdcard/ directory of the target/emulator. For the emulator this can be done in the "Device Explorer" of the emulator in Android Studio.
2. Android Studio

These steps are to prepare the Android Studio to build and run the Android application.

  1. Open the Android Application in Android Studio from “X:\cgi_studio_apps\References\Android\SampleApp”.
  2. Open the “local.properties.sample” file and change the “USERNAME” in the SDK  path to match the
    system it will be used on and choose the supported ['arm64-v8a', 'x86_64', 'x86'] ABI "mAbi".

    image.png



  3. Copy the contents of the "local.properties.sample" to “local.properties”. Note that if the SDK paths do not exist, Android Studio will reset the “local.properties” again after trying to Sync Project with Gradle Files.
  4. Make sure the JDK is set to 17 in [File | Settings | Build, Execution, Deployment | Build Tools | Gradle]
    like described in chapter Java Development Kit (JDK).
  5. Run the Application by selecting the target/emulator and clicking on “run app”.
  6. The first time the Application starts, it will request permissions. After granting the permissions, the application should run successfully.

Troubleshooting

  • If encountering any issues during the setup, refer to the official documentation for Android Studio,
    CMake, and NDK for troubleshooting steps.
  • If you encounter any issues linked to outdated source code, reach out to the Android developers for
    assistance in implementing a resolution.
  • Check for updates regularly and keep your development environment components up to date.

Platform Tests

  • Samsung Tab SM-P615, arm64, Android 13, API 33
  • Emulator Medium Phone, x86_64, Android 14, API 34 
  • Emulator Medium Phone, x86_64, Android 15, API 35 
  • Emulator Medium Phone, x86_64, Android 16, API 36