feature element
Supported platforms
-
BlackBerry OS: 5.0 - 7.0 -
BlackBerry PlayBook OS: 2.0+ -
BlackBerry 10 OS
Syntax
<feature id="string"
required=["true" | "false"]
version="string" />
Description
The <feature> element specifies a BlackBerry feature that a BlackBerry WebWorks application 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 configuration document, 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 application cannot use the API for the specified domain.
Parent elements
Child elements
- BlackBerry 10 OS: <param>
- BlackBerry OS and BlackBerry PlayBook OS: None
Occurrences
Zero or more
Attributes
You can use the following attributes in this element:
| Attribute | Description |
|---|---|
| id | The id attribute
can specify:
The id attribute is required for all platforms. |
| 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. |
Examples: Specifying feature access
For BlackBerry 10 OS:
<feature id="blackberry.ui.dialog" required="true" version="1.0.0.0"/>
<feature id="enable-flash"/>
<access uri="http://www.somedomain.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>
For BlackBerry PlayBook OS:
<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>
For BlackBerry 7 and earlier:
<feature id="blackberry.ui.dialog" required="true" version="1.0.0"/> <access uri="http://www.somedomain.com" subdomains="true"> <feature id="blackberry.pim.memo" required="true" version="1.0.0"/> <feature id="blackberry.invoke.MemoArguments" required="true" version="1.0.0"/> </access>
Last modified: 2013-05-02