Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

An .alx file

by Retired ‎02-16-2010 03:00 PM - edited ‎02-18-2010 10:45 AM (14,282 Views)

Summary


This article applies to the following:

  • BlackBerry® Java® Development Environment (BlackBerry JDE)
  • BlackBerry® JDE Plug-in for Eclipse®
  • BlackBerry smartphones based on Java® technology


Details


The application loader tool, which is part of the BlackBerry® Desktop Software, uses an application loader (.alx) file to load new applications onto the BlackBerry smartphone. Use the BlackBerry JDE to generate .alx files for your projects.


The following information is provided only as a supplementary reference. In most cases, you do not need to edit the .alx files generated in the BlackBerry JDE.

  1. In the BlackBerry JDE or Eclipse®, right-click the project.
  2. From the menu, click Generate .alx File. An .alx file for the project is output to folder in which the .jdp project file is located.

You can now distribute this .alx file with the .cod files for your application to BlackBerry smartphone users. When BlackBerry smartphone users connect their BlackBerry smartphones to the computer, they can use the BlackBerry Desktop Software to load the application onto the BlackBerry smartphone.


Example file


In a text editor, you can edit .alx files that the BlackBerry JDE generates. The .alx file uses an Extensible Markup Language (XML) format. This is an example of an .alx file for one application:



<loader version="1.0">
<application id="com.rim.samples.device.httpdemo">
<name>Sample Network Application</name>
<description>
Retrieves a sample page over HTTP connection.
</description>
<version>1.0</version>
<vendor>Research In Motion</vendor>
<copyright>Copyright 1998-2003 Research In Motion</copyright>
<language langid="0x000c">
<name>Application D'echantillon</name>
<description>
Obtenir une page du reseau
</description>
</language>
<fileset Java="1.0">
<directory>samples/httpdemo</directory>
<files>
net_rim_httpdemo.cod
net_rim_resource.cod
net_rim_resource__en.cod
net_rim_resource__fr.cod
</files>
</fileset>
</application>
</loader>


Nesting modules


You can create a nested structure in an .alx file to provide optional components for an application. Typically, nested modules provide optional features that are not applicable to all users. Users can choose whether to install optional modules.


Nesting creates an implicit dependency for nested modules on the base application. To define an explicit dependency on another application or library, use the <requires> tag. Refer to the "Elements in .alx files" table later in this article for more information.


The following is an example of an .alx file for an application with a nested module:



<loader version="1.0">
<application id="net.rim.sample.contacts">
<name>Sample Contacts Application</name>
<description>
Provides the ability to store a list of contacts.
</description>
<version>1.0</version>
<vendor>Research In Motion</vendor>
<copyright>Copyright 1998-2001 Research In Motion</copyright>
<fileset Java="1.0">
<directory>samples/contacts</directory>
<files>
net_rim_contacts.cod
net_rim_resource.cod
net_rim_resource__en.cod
net_rim_resource__fr.cod
</files>
</fileset>
<application id="net.rim.sample.contacts.mail">
<name>Sample Module for Contacts E-Mail Integration</name>
<description>
Provides the ability to access the email application
</description>
<version>1.0</version>
<vendor>Research In Motion</vendor>
<copyright>Copyright 1998-2001 Research In Motion</copyright>
<fileset Java="1.0">
<directory>samples/contacts</directory>
<files>
net_rim_contacts_mail.cod
</files>
</fileset>
</application>
</application>
</loader>


Elements in .alx files


The following table describes each element (tag) and attribute. Elements are mandatory unless noted otherwise.


Element  Attributes  Description 
loader version The loader element contains one or more application elements. The version attribute specifies the version of the application loader tool. The version in this release is 1.0.
application id

The application element contains the elements for a single application. The application element can also contain additional nested application elements. Nesting enables you to require that when an application is loaded, its prerequisite modules are also loaded.

The id attribute specifies a unique identifier for the application. You should use an ID that includes your company domain, in reverse, to provide uniqueness (for example, com.rim.samples.device.helloworld).

library id

The optional library element can be used instead of the application tab. It contains the elements for a single library module. No nested modules are permitted. By default, a library module is hidden so that it does not appear in the application loader tool.

Typically, you would use the library element as the target of a element, so that when a particular application is loaded onto the BlackBerry smartphone, a required library is also loaded.

Note: This element is supported by BlackBerry Desktop Software 3.6 or later.

name   The optional name element provides a descriptive name for the application, which appears in the application loader tool. It does not appear on the BlackBerry smartphone.
description   The optional description element provides a brief description of the application. The description appears in the application loader tool. It does not appear on the BlackBerry smartphone.
version   The version element provides the version number of the application, which appears in the application loader tool. This version number is for information purposes only.
vendor   The optional vendor element provides the name of the company that created the application, which appears in the application loader tool.
copyright   The optional copyright element provides copyright information, which appears in the application loader tool.
required  

The optional required element allows you to force an application to be loaded. In the application loader tool, the application to be installed is selected and the BlackBerry smartphone user cannot change this. Add the following line:

<required>true</required>

Note: This element is supported by BlackBerry Desktop Software 3.6 or later.

hidden  

The optional hidden element hides a package so that it does not appear to BlackBerry smartphone users in the application loader tool. Add the following line:

<hidden>true</hidden>

Typically, you would use this element in conjunction with the required element to load the application by default, or you would set the requires tag to load this package if another application is loaded. The hidden tag should be used by corporate system administrators only; it is not intended for use by third-party software vendors.

Note: This element is supported by BlackBerry Desktop Software 3.6 or later.

language langid

The optional language tag allows you to override the text that appears in the application loader tool when the application loader tool is running in the language specified by the langid attribute.

You can specify multiple language tags, one for each language that you want to support. In each language tab, you can nest the name, description, version, vendor, and copyright tags. If you do not nest a tag, the text appears in the default language.

The langid attribute specifies the Win32 langid code for the language to which this information applies. For example, some Win32 langid codes are: 0x0009 (English), 0x0007 (German), 0x000a (Spanish), 0x000c (French).

requires id

The requires element is an optional element that specifies the id of a package on which this application depends. This element can appear more than once, if the application depends on more than one other application.

When an application is loaded onto the BlackBerry smartphone, all packages that are specified by the <requires> tag are also loaded.

Note: This element is supported by BlackBerry Desktop Software 3.6 or later.

fileset Java The fileset element is a mandatory element. The "Java=1.0" attribute is intended to provide a mechanism to flag modules as requiring a particular level of Java Virtual Machine (JVM) functionality.
files   The files element is a mandatory element that brackets a list of .cod files to load.
Contributors
Users Online
Currently online: 31 members 6,238 guests
Please welcome our newest community members: