feature element

Syntax

<feature id="string" 
         required=["true" | "false"]
         version="string" />

Description

The <feature> element specifies a BlackBerry feature that a BlackBerry WebWorks app can use; the feature can be a particular BlackBerry API or an option to enable a feature or functionality (for example, enabling the Adobe Flash plug-in to render Flash content).

You can use the <feature> element within the <access> element to access a feature under the external domain. You can also use the <feature> element at the root of the config.xml file, before any <access> elements, for access to the local web page.

If you do not specify an <access> element above the <feature> element, the local domain is used. If you do not specify an API, the app cannot use the API for the specified domain.

Parent elements

<widget>, <access>

Child elements

None

Occurrences

Zero or more

Attributes

You can use the following attributes in this element:

Attribute Description
id The id attribute can specify:
  • The name of the BlackBerry API. The value must match the name of the API, but is not case sensitive. You cannot use a wildcard (*) to use multiple namespaces at the same time.

The id attribute is required.

required

The required attribute is provided to conform to the W3C specification.

This attribute is optional.

version

The version attribute specifies the library version of the API.

This attribute is optional.

Example: Specifying feature access

<feature id="blackberry.ui.dialog" required="true" version="1.0.0"/>
<access uri="http://www.somedomain.com" subdomains="true">
   <feature id="blackberry.app.event" required="true" version="1.0.0"/>
   <feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

Last modified: 2013-08-29