Create your config.xml file

The config.xml file is an .xml file that contains the elements that define your app's properties. The config.xml file defines the BlackBerry WebWorks application namespace; it provides general app information, such as the app name, description, start page, and home screen icon; and it specifies the features and functionality that the app can access.

Every BlackBerry WebWorks app must have a config.xml file located in the root folder of your application archive. The file name is case insensitive.

The root element of the config.xml file is the widget element. The widget element provides a container for all other elements.

For a list of all the elements that you can use in a config.xml file, see Elements in config.xml. The structure and supported elements differ slightly depending on which BlackBerry OS you are developing for.

Sample config.xml file

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="2.0"
        rim:header="RIM-Widget: rim/widget">

  <author href="http://www.example.com/" 
          rim:copyright="Copyright 1998-2012 My Corp">My Corp</author>

  <rim:navigation mode="focus" />

  <name>Sample application</name>

  <description>
    A sample application to demonstrate some features.
  </description>

  <rim:orientation mode="auto"/>

  <rim:loadingScreen backgroundImage="background.png"
                     foregroundImage="foreground.gif"
                     onLocalPageLoad="true">
    <rim:transitionEffect type="zoomIn" />
  </rim:loadingScreen>

  <icon src="icons/example.png"/>
  <icon src="icons/boo.png" rim:hover="true"/>

  <rim:cache maxCacheSizeTotal="2048" maxCacheSizeItem ="256" />

  <content src="index.html" >
    <rim:background src="listener.html" runOnStartup="true" />
  </content>

  <feature id="blackberry.ui.dialog"/>

  <access uri="http://www.somedomain.com" subdomains="true">
    <feature id="blackberry.pim.memo"/>
    <feature id="blackberry.invoke.MemoArguments"/>
  </access>

  <rim:connection timeout="25000">
    <id>TCP_WIFI</id>
    <id>MDS</id>
    <id>BIS-B</id>
    <id>TCP_CELLULAR</id>
    <id>WAP2</id>
    <id>WAP</id>
  </rim:connection>

  <license>
    Example license
    Copyright (c) 2012 My Corp.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
    WHETHER IN AN ACTION OF CONTRACT, INSULT OR OTHERWISE, ARISING 
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
    OTHER DEALINGS IN THE SOFTWARE.
  </license>

</widget>

Last modified: 2013-10-02