What is the BAR application descriptor file?

The BAR application descriptor file (or simply the application descriptor file), named the bar-descriptor.xml file , specifies the parameters for identifying, installing, and launching native applications on BlackBerry Tablet OS

The application descriptor file is an XML file with a structure defined by the Document Type Definition (DTD) for the application descriptor file. The root element in the application descriptor file is <qnx>. You nest all other XML elements within the <qnx> element.

All app projects require an application descriptor file. You configure things such as the:

  • appearance and behavior of your application on the BlackBerry Tablet OS
  • application name, author, and other descriptive information required for your application
  • debug token to run on BlackBerry PlayBook tablets
  • assets to include in the package for the application, such as icons, libraries, and images
  • permissions required for the application, such as access the LED, camera, or access to files

If you create a project for your app in the QNX Momentics IDE, the application descriptor file is automatically created and packaged in the BAR file (.bar file) when you run a launch configuration. The IDE provides the Capabilities editor that lets you add and modify the information for the application using a tabbed user interface. Alternatively, you can edit the application descriptor file directly in the IDE or using another text-based editor.

If your preference is to work outside of the QNX Momentics IDE, for instance using command-line tools and text-based editors, you must manually create the application descriptor file and ensure that it is named bar-descriptor.xml. When you are ready to package your application into a BAR file outside of the IDE, you specify the name of the application descriptor file as one of the parameters in the blackberry-nativepackager command-line tool.