appinfo.json

The appinfo.json file resides in an app's root directory and contains a single JSON object.

If the application is localized into more than one language, each language can have its own appinfo.json file. However, the application title and version number in each localized appinfo.json must be the same as in the top-level appinfo.json. The application title and version in the top-level appinfo.json are validated for correct value and structure. Any application that fails the validation cannot be packaged or uploaded.

A note about JSON syntax:

  • Do not include any comments in json files (/* or //)
  • Use double quotes around properties--no single quotes.

Schema

{
   "dockmode"            : boolean,
   "icon"                : string,
   "id"                  : string,
   "keywords"            : string array,
   "main"                : string,
   "miniicon"            : string,
   "noDeprecatedStyles"  : boolean,
   "noWindow"            : boolean,
   "plug-ins"            : boolean,
   "requiredMemory"      : number,
   "tapToShareSupported" : boolean,
   "theme"               : string,
   "title"               : string,
   "type"                : string,
   "uiRevision"          : string,
   "vendor"              : string,
   "vendorurl"           : string,
   "version"             : string,
   "universalSearch" : {
      "action" :  { 
          "displayName" : string,
          "url"         : string,
          "launchParam" : string | any object
      },
      "dbsearch":  {
          "displayName"        : string,
          "url"                : string,
          "launchParam"        : string,
          "launchParamDbField" : string,
          "displayFields"      : string array,
          "dbQuery"            : db8 Query object array
      },
      "search" :   { 
          "displayName"  : string,
          "url"          : string,
          "launchParam"  : string | any object
      }
   } 
}

Properties

Property Required Type Description
dockmode No boolean Set to true if you want your app to be launchable when attached to a Touchstone charging dock. Default is false.
icon No string Image displayed for your app. This is a file path relative to the appinfo.json file. The default is "icon.png".
id Yes string Application ID, i.e., "com.newco.app.myApp" . Every application has a unique ID, created from reverse DNS naming conventions. The launcher uses the ID to uniquely identify your application and displays it with the title above. The application ID is unique, set once, and cannot be changed after publishing the application.
keywords no string array Keyword meta-data. Just Type list apps that contain the user-entered text in their "keywords" values.
main Yes string The launch point for the app. This is a file path relative to the appinfo.json file and needs to point to an HTML file. The default is "index.html".
miniicon No string Used for notifications. This is a file path relative to the appinfo.json file. The default is "miniicon.png".
noDeprecatedStyles No boolean When set to true, suppresses loading of the global-deprecated.css style sheet, slightly improving the framework load time.
noWindow No boolean Is this app a headless app? (Default is false). More information on how this affects Enyo applications is available in a separate article.
plug-ins No boolean Set to true if your app makes use of PDK plug-ins.
requiredMemory No number Required for a PDK app. This is the maximum application memory usage in megabytes.
tapToShareSupported No boolean Set to true if your app wishes to make use of the Touch2Share feature via the Seamless Transitions service - com.palm.stservice.
theme No string When set to "light" the dark CSS styles are not loaded, slightly improving the framework load time.
title Yes string The title of the application as it shows in the Launcher and the app window. The application title is unique, set once, and cannot be changed after publishing the application.
type Yes string web|pdk
Identifies the application type: "web" if an SDK-based or hybrid app, "pdk" if a PDK-based app.
uiRevision No string If set to "2", apps can make full use of the TouchPad screen; otherwise, the app is given a 320x480 window in which to display.
vendor Yes string App owner. This is used in the launcher and deviceinfo dialogs.
vendorurl No string URL that turns the vendor portion in deviceinfo dialogs to hyperlinks.
version Yes string The application version number, in the dot-notation format. The major, minor, and revision numbers are all mandatory non-negative integers. Leading zeros are stripped. The major, minor, and revision numbers are discrete. For example, 1.5.3 is a lower version than 1.15.3. After uploading an application, the same version cannot be uploaded again. To update and re-upload an application, you must increase the version number.
universalSearch No object Just Type configuration object.
action No object Quick Actions configuration object. In Just Type, what appears in the Quick Actions menu are apps that initiate a new action with the user-entered text. For exampe: a new email, a new memo, etc.
displayName No string App's display name in Just Type's Quick Actions menu.
url No string Application ID, i.e., "com.palmdts.contacts"
launchParam No string or any object HTML-encoded, passed as an argument when the app is launched; indicates the action the app should take.
dbsearch No object Defines how Just Type accesses an application's db8 stored data for its Launch menu.
displayName No string App's display name in Just Type's Launch menu.
url No string Application ID.
launchParam No string Name of field passed as an argument to the app.
launchParamDbField No string Name of field in database whose value is passed in "launchParam" to identify the record selected, usually the object's db8 ID ("_id").
displayFields No string array db8 query result set fields displayed to user in Just Type, i.e., "firstname", "lastname", ...
dbQuery No Query object array Array of db8 queries used in Just Type. The "val" field value (in the query's where clause) is set to the user-entered search text. See the db8 documentation for information on formatting a db8 query.
search No object Configures an app for the Search Using menu in Just Type.
displayName No string App's display name in Just Type's Search Using menu.
url No string Application ID, i.e., "com.palmdts.contacts"
launchParam No string or any object HTML-encoded, passed as an argument when the app is launched. If this field is a string, then it names a property of launchParams and is set to the user-entered text. For example, if set to "myField", then launchParams.myField contains the user-entered text. If defined as an object that contains "#{searchTerms}", then launchParams is set to that object but "#{searchTerms}" is replaced with the user-entered text.

Although the framework does not use it, it is worth mentioning that the application launcher uses a params property, which it passes in its entirety to ApplicationService.launch(). The appinfo.json file can contain any other valid JSON a developer finds useful, which can then be accessed through Mojo.Controller.appInfo. For example, the Email and Calendar applications use this to specify an lwStages property that they pass to createStageWithCallback() to indicate whether or not lightweight stages should be used.

Just Type Integration

See Configuring appinfo.json for Just Type for more information on parameters (universalSearch object) required to integrate Just Type functionality into your app.

App ID

The appinfo.json object gives the system the information it needs to load and launch your application. The most important property is id, which must be unique for each application. The ID is used in service calls to identify the caller and in other ways serves as a unique application identifier. We recommend a reverse DNS naming convention, but you can use other schemes if the ID is guaranteed to be unique.

The app id must consist only of lowercase letters (a-z), digits (0-9), plus and minus signs, and periods. It must be at least two characters long and must start with an alphanumeric character.

Examples

Here is a simple example of an appinfo.json object using the required fields and defaults. This is generated by the palm-generate command if you gave it "My App" as input for the application name.

{
    "title":    "MyApp",
    "type":     "web",
    "main":     "index.html",
    "id":       "com.yourdomain.app.myapp",
    "version":  "1.0.3",
    "icon":     "icon.png"
}

Here is a more involved example - an app configured to use the new Just Type feature:

{
  "timestamp": "2011-06-02.10:48:51",
  "title": "Memos",
  "splashicon": "icon-256x256.png",
  "icon": "icon.png",
  "id": "com.palm.app.notes",
  "version": "3.0.1307036931",
  "type": "web",
  "uiRevision": 2,
  "main": "index.html",
  "vendor": "Palm, Inc.",
  "universalSearch": {
    "action": {
      "displayName": "New Memo",
      "url": "com.palm.app.notes",
      "launchParam": "text"
    }
  },
  "keywords": [
    "Notes",
    "Stickies",
    "Notepad"
  ],
  "splashBackground": "images/splash-background.png"
}