Working with the configuration file

The configuration file is a platform-agnostic XML file that contains information about your HTML5 app.

The configuration (config.xml) file is located in your HTML5 project's www folder. This file is used to control many aspects of an app's behavior. The config.xml file is based on the Cordova's config.xml, but the HTML5 SDK provides additional elements to support specific app behavior. If you are familiar with working with BlackBerry Webworks, you may notice some of the element names look familiar, but it isn't a one-to-one mapping and functionality differs slightly in the HTML5 SDK.

During the build process, the contents of the config.xml are used to generate the bar-descriptor.xml file. It's common to modify the config.xml to add permissions for an app. There are default permissions available you can use, but you can also create your own custom permission. A custom permission allows you to control access to resources and Persistent Publish/Subscribe(PPS) objects that you create. For more information about creating custom permissions, see Example: Adding a permission to access a PPS object.

The following table lists the elements that are applicable for config.xml when you use the HTML5 SDK.
Element Description
<access> Specifies that the app can access external network resources. If you do not specify an <access> element, the app can access only local resources. Local access includes the resources packaged with the app in the .bar file.
<author> Specifies the name (typically the company or developer name).
<config-file> Specifies configuration settings to add to a configuration file.
<content> Specifies the start page that the Cordova app uses when it runs. The start page can contain the web address of a file that is located outside of the application archive.
<description> Specifies a human-readable description for the Cordova app.
<feature> Specifies the plugins to use with your app.
<name> Specifies a human-readable name for the Cordova app.
<icon> Specifies that image that appears on the screen. The image should be 86x86 pixels.
<rim:permissions> Specifies permission access to various features.
<rim:permit> Specifies permission access to various features. The list of features is available in the sys.acl and sys.res files on your target system. For more information, see "Authorization Manager" in the System Services Reference.
<widget> The top-level parent component and follows the Cordova specification. See Project Settings in the Cordova Documentation