manifest.json Details

manifest.json provides important meta information about your custom application.

  • Required to be present at the top level of a custom app tarball
  • The file must be JSON format.
  • After installation, it will be located at /media/card/<app_name>/manifest.json, var/config/app/<app-anme>/manifest.json or or /var/persistent/<app_name>/manifest.json
  • Can place an optional boolean variable into manifest.json that determines where to save the app: 1) to an SD card, or 2) in flash. Otherwise this is handled automatically (see details below).

Format Details

Key
Value Type Description
AppName String Name of the application. This is used for the installed app directory name and displaying in the UI and on DeviceHQTM
AppVersion String Version of the application. DeviceHQ uses this to distinguish between versions
AppDescription String Description for your purposes
AppVersionNotes String Any applicable notes for the particular version of the application displayed on DeviceHQ
SDCard Boolean Optional variable determines where to save app. If true, it saves to SD card. If false, saves in flash.
PersistentStorage Boolean Optional variable. When set to true, application is stored and installed from the /var/persistent directory location.


Example manifest.json

{
    “AppName” : “LoraSensor”,
    “AppVersion : “1.0”,
    “AppDescription” : “Example app”,
    “AppVersionNotes” : “Added new feature”
}

Optional SDCard boolean variable

You can use an optional boolean variable, SDCard, to determine where to save the app. If SDCard is true and an SD card is present, the app saves to the SD card (in /media/card/<app_name>).  If false, the app saves in flash (in /var/config/app/<app_name>).

NOTE: If SDCard is true but the card is not present, the installation fails with an error.

Here is an example of manifest.json using SDCard:

 
{
“AppName” : “<string_value>”,
“AppVersion : “<string_value>”,
“AppDescription” : “<string_value>”,
“AppVersionNotes” : “<string_value>”,
“SDCard” : <boolean>
}

If you do not use SDCard in the file, the app-manager determines if the SD Card is inserted automatically and installs in flash or to the card for you.

You can use the optional boolean variable, PersistentStorage, to have the application saved to the /var/persistent directory where it will be installed from.  The /var/persistent directory and its contents will not be deleted on firmware upgrade.

Here is an example of manifest.json using PersistentStorage:

 
{

“AppName” : “<string_value>”,
“AppVersion : “<string_value>”,
“AppDescription” : “<string_value>”,
“AppVersionNotes” : “<string_value>”,
“PersistentStorage” : <boolean>

}

If you do not use either the SDCard or PersistentStorage booleans, the application will use the /var/config/app location by default.

SDCard Algorithm

The following is pseudo code logic for handling the installation of a Custom Application with these enhancements:

if “PersistentStorage” present in manifest.json:
     if “PersistentStorage” == true:
          Install in /var/persistent/<app_name>
else if “SDCard” present in manifest.json:
     if “SDCard” == true:
          if SD Card is inserted:
               Install in /media/card/<app_name>
          else:
               FAIL
     else:
          Install in /var/config/app/<app_name>
else if SD Card is inserted:
     Install in /media/card/<app_name>
else:
     Install in /var/config/app/<app_name>