Using BlackBerry WebWorks APIs

If you want to use BlackBerry WebWorks APIs, you should note the changes you need to make in the config.xml file. You must specify the name of the API you want to use in your app's configuration file, which is called config.xml. To specify an API, you add a <feature> element to your config.xml file and include the name of the API in the id attribute.

For example, to add a standard system dialog box in your app, you need to use functionality of the Dialog object in the blackberry.ui.dialog API. So, you add the following to your config.xml file:
<feature id="blackberry.ui.dialog">

For every API you want to use, make sure to read the details of the configuration requirements in the BlackBerry WebWorks API reference. The API reference provides the specific <feature> elements you need to include for the API that you want to use.

In general, you do not need to add <feature> elements for APIs that begin with "HTML5" (for example, HTML5 FileSystem, HTML5 Geolocation, and so on).

Last modified: 2013-08-14