Creating the JavaScript for the extension

The JavaScript part of an extension must contain, at a minimum, the following resources:

client.js
Considered the client side, this file exports APIs that are accessible from the client's app. The client.js filename is mandatory.
index.js
Considered the server side, this file exports APIs that are accessible from client.js and communicates with the native side. The index.js filename is mandatory.
manifest.json
This file contains the extension descriptor that defines the whitelisting flag, ID, and dependencies of other extensions for the extension. The manifext.json filename is mandatory.

If the extension includes one or more events, two additional files must also be defined for your own extension:

context.js
This file defines the addEventListener and removeEventListener methods that are called from the app.
extension_name.js
You need a second file to deal with the PPS activities of the extension. This filename is arbitrary.
Note: You may end up defining one or more other files to provide interfaces to SQLite, Screen, etc.

We will use the files of the qnx.volume extension as examples to illustrate how to build these files for your own extension.

For additional information, see the document reference table below.

Document Overview
JavaScript Reference Describes the JavaScript extensions and how to use them in your apps.
HMI Developer's Guide Describes how to develop the HMI.