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.0.0">

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

  <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>
		
  <rim:category name="games"/>	

  <rim:permissions>
    <rim:permit>access_shared</rim:permit>
    <rim:permit>read_geolocation</rim:permit>
    <rim:permit>use_camera</rim:permit>  
  </rim:permissions>

  <icon src="icons/example.png"/>

  <content src="index.html"/>

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

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

</widget>

Last modified: 2013-08-29