Changes to the config.xml file
Although BlackBerry WebWorks 1.0 and BlackBerry WebWorks 2.0 or later both use a config.xml file to store configuration information for your project, how they are created and used differs slightly.
As of BlackBerry WebWorks 2.0, if you need to manually edit the config.xml file, you can find it your project's root folder.
Reduced need to manually edit the config.xml file
With BlackBerry WebWorks 2.0 or later, there is little need for you to edit the config.xml file manually. Most of the configuration settings can be manged through the BlackBerry 10 WebWorks SDK web tool. A config.xml file is created automatically and prepopulated with template configuration information when you create your project.
You can use the BlackBerry 10 WebWorks SDK web tool to customize the contents of the file. Clicking BlackBerry WebWorks <version> on the Start menu opens the BlackBerry 10 WebWorks SDK web tool. You can click the Configuration button under your project's name in the navigation panel to view and edit most of your app's configuration settings, including the metadata, orientation, background color, and more. The web tool also allows you to add your plugins, and allows you to set any necessary plugin permissions.
The only instance where you need to manually edit the config.xml file is if you want to set up your app as an invocation target. In this case, you must still manually add the <rim:invoke> element and its children to register the app as an invocation target and to define which file types your app can handle.
No need to add <feature> elements to the config.xml file
If you intend to reuse your existing config.xml file, there is no longer any need to add <feature> elements to the config.xml file. The BlackBerry WebWorks tools now handle adding these elements at build time, based on which plugins you've added to your project. For best results, once you have added the required plugins to your project, you should remove all <feature> elements from your existing config.xml.
The <preference> element replaces the <param> element
How you set the configuration parameters associated with the Application API (for example, to define the app orientation or background color) has changed as of BlackBerry WebWorks 2.0.
<feature id="blackberry.app"> <param name="orientation" value="portrait" /> </feature>
<widget> . . . <preference name="orientation" value="portrait" /> </widget>
If you choose, you can set all preferences directly in the BlackBerry 10 WebWorks SDK web tool.
For more information on how to add the <preference> element to the config.xml file manually, see <preference>.
Last modified: 2014-10-09