Detailed description of appinfo. JSON file in Palm application development 3

Source: Internet
Author: User
Tags reverse dns

Directory of this series:

  1. Introduction to palm web OS
  2. Build a development environment in one of palm Application Development
  3. Palm application development 2: Learning from helloworld

Overview

The root directory of the application folder contains an appinfo. JSON file. This file contains a javascript JSON object. If the application is a multi-language version, you must configure your own localized appinfo. JSON for each language. However, the title and version number of the application must be the same as the top-level appinfo. JSON. If the title and version number of the application are different from the top-level structure or value, the application cannot be packaged and installed, which is very important in multi-language applications.

Syntax description of appinfo. JSON:

* This file cannot contain any annotated text, but only JSON objects. For example, // or/**/is not allowed. Otherwise, an error occurs, making the application unable to be installed normally.

* Attributes and values in JSON objects must be enclosed by double quotation marks.

Attribute details

Appinfo. JSON property list:

Attribute name

Optional

Description

Example

Icon

Optional

The path string of an image file in PNG or GIF format. The path is relative to appinfo. JSON. It is the icon displayed by the application in the system. The default value is icon.png.

For example: "images/appicon.png"

ID

Required

This is the Application ID. Each application has an ID, which must be unique and unique. It is the unique identifier of the application, after the application is installed on the system, the initiator starts and manages the application based on this ID. Once the application is published, the ID cannot be modified, if changed, it would be a new program.

For example: "com. Palm. mycompany. Weather"

Main

Required

Is the entry point of the application. This is an HTML file with a file path relative to the appinfo. JSON file. The default value is index.html.

For example, "index.html"

Miniicon

Optional

The icon used for notification. This is an image file with a file path relative to appinfo. JSON. The value is miniicon.png.

For example: "appnini-icon.png"

Nodeprecatedstyles

Optional

Is a bool value. If set to true, the global-deprecated.css file is loaded

For example, true

Nowindow

Optional

Whether to allow an application without a menu bar. It is a bool value.

For example, false

Theme

Optional

When it is set to "light", dark CSS will not be loaded, which will make loading faster.

For example, "dark"

Title

Required

This is the name of the application. After the application is installed, it is displayed below the application level icon of the starter. After the application level is started, it is the title of the application level, this title should be unique. Otherwise, the title will be confused in the starter. After the application level is published, the name cannot be changed.

For example, "Weather Forecast"

Type

Required

Identifies the application type. The default value is "Web"

For example, "game"

Vendorurl

Optional

A string that identifies a URL. Generally, developers can download their own URLs here.

For example: "http://vaiyanzi.cnblogs.com"

Version

Required

The version number of the application, in the format of... main and secondary. The version number is a mandatory non-negative integer.

For example, "1.0.12"

 
This file is a global parameter storage, and its parameters are passed to applicationservice. Launch (). The appinfo. JSON file can contain any other valid information that the JSON developer deems useful, and can then be accessed through mojo. Controller. appinfo. For example, in the email and calendar application, this attribute is used to specify whether lwstages are passed to createstagewithcallback () to determine whether to start a new "stage ".

APP ID

The appinfo. JSON file provides the information required by the system to load and start the application. The most important attribute is ID. Each application must be unique. This ID is the identifier used to call other applications. It is also the unique identifier used to provide services for other applications. Therefore, it is very important to ensure the uniqueness of appid. We recommend that you use reverse DNS naming conventions or other naming conventions. The Application ID must only contain lowercase letters (A-z), numbers (0-9 ), plus signs, minus signs, and periods.

Example

The following is a simple example. The appinfo. JSON object uses the required fields and default values.

{
"Title": "MyApp ",
"Type": "Web ",
"Main": "index.html ",
"ID": "com. yourdomain. App. MyApp ",
"Version": "1.0.3 ",
"Icon": "icon.png"
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.