Project Configuration

What is a Project Config?

The Mason Project Configuration is a versioned manifest of the software and configurations that can be deployed to devices in a group.

Creating a Project Config

Project Configuration files are represented in the YAML file format. To create a Project Configuration YAML, open a new text file in your favorite text editor and start defining your project details.

To get a head start, copy the Example Project Configuration into the text file and “Save As”, renaming the file extension to .yml. From there you can customize the configurations, app, and media enumerations however you’d like.

Notes For YAML Format

The YAML file format has a strict syntax policy that will have to be followed for the Mason Platform to accept a configuration file. For further YAML syntax information, see https://en.wikipedia.org/wiki/YAML#Syntax.

Available Configurations

To view all available configurations, visit the Configuration Glossary.

Example Project Config

Example snippet Warehouse Distribution Configuration (see breakdown below):

os:
  name: warehouse-distribution
  version: latest
  configurations:
    mason-management:
      disable_keyguard: true
      disable_status_bar: false
    mason-fota:
      config_allow_download_over_metered: false
      config_update_check_frequency: 6
      config_update_install_time: 12:30
      config_update_install_battery_threshold: 20
      config_update_prompt_prior_to_install: true
    mason-app-updater:
      config_allow_download_over_metered: true
      config_update_check_frequency: 12
      config_update_install_time: 01:00
      config_update_install_battery_threshold: 20

apps:
  - name: Test App
    package_name: com.warehouses.distribution
    version_code: 12

media:
  bootanimation:
    name: warehouse-distro-boot
    version: latest

Breakdown of the project config

  • os: (see definition)
    • name: warehouse-distribution: The project identifier that is known in the Mason Platform Project Dashboard. In this case, the project ID is warehouse-distribution.
    • version: latest: The version of this project config. In this case, the version is a special value called latest which will automatically be populated with a number like 1 (see definition).
    • configurations: An enumeration of all the different software configurations for this project config (see definition).
  • apps: (see definition)
    • name: Test App: An arbitrary name for your use only.
    • package_name: com.warehouses.distribution: The package name of the APK. com.warehouses.distribution in this case.
    • version_code: 12: The version code of the APK, as it is packaged in the APK. In this case, the version is hardcoded to 12, but the special value latest may also be used to pick the most recently registered APK.
  • media: (see definition)
    • bootanimation:
      • name: warehouse-distro-boot: The name of the boot animation as it has been registered in the Mason Platform. In this case, the boot animation ID is warehouse-distro-boot.
      • version: latest: The version code of the boot animation as it has been registered to the Mason Platform. In this case, the version uses the special latest value to automatically pick the most recently register boot animation, but a hardcoded number may also be used.

“os” Definition

The os tag is the metadata declaration of the project config. In its most basic form, only two fields are required: name and version.

Name

The os name describes the Project Identifier as it is known in the Mason Platform Project Dashboard.

Example

os:
  name: awesome-project

Version

The os version is a numeric, monotonically incremented, revision representation of the project config. However, in all places where you must specify a version, the latest keyword can be used instead for a more hands-off approach to versioning.

Example

os:
  name: awesome-project
  version: 1

Configurations

The os configurations object is an enumeration of all the different software configurations for this project config (see definition).

Example

configurations:
  example-object:
    example_settings: false

“configurations” Definition

configurations are the software configurations that dictate everything from update policy, UI behavior, and even hardware behavior for a specific mason build.

Each configuration is described by a configuration type and a key value pair that dictates the setting.

Example

configurations:
  mason-management:
    disable_keyguard: true
    disable_status_bar: false

The configuration definition above dictates that the keyguard (lockscreen) should be disabled on this software distribution, while the status bar should not be. To view all available configurations, visit the Configuration Glossary.

“apps” Definition

The apps object enumerates all the registered Android applications that are to be included into the software build. Only the package_name and version_code properties are required.

  • The name attribute defines an arbitrary name (for your own record keeping)
  • The package_name attribute comes from the package name in your APK’s AndroidManifest.xml
  • The version_code attribute comes from the version code in your APK’s AndroidManifest.xml
  • For more details on registering an Android application, see Registering APK Artifacts

Single app example

apps:
  - name: Test App
    package_name: com.test.app
    version_code: 1

Multi app example

apps:
  - name: Test App 1
    package_name: com.test.app
    version_code: 1
  - name: Test App 2
    package_name: com.test.app2
    version_code: 1

“media” Definition

The media object enumerates all the media configurations for the software distribution.

Supported types are:

  • Boot animations
  • Splash screens
    • Images used for the splash screen must be *.png
    • Images may be scaled for device resolution requirements
    • Any transparent pixels will be ignored

Example

media:
  bootanimation:
    name: test-boot
    version: 1
  splash:
    name: test-splash
    version: 1