Basic appendix of the BlackBerry Application Developer guide. alx File

Source: Internet
Author: User

The application loading tool is part of the BlackBerry desktop software and uses an application to load files (. alx) load the application to the BlackBerry device. use BlackBerry IDE to generate. alx file.

The following information is for reference only. In most cases, you do not need to edit the. alx file 1 generated by BlackBerry IDE.

In the text editor, you can edit the. alx file generated by BlackBerry IDE. The. alx file uses the XML format:

Example:. alx file sample

 
  1. <? Xml version = "1.0" encoding = "UTF-8"?>
  2.  
  3. <Loader version = "1.0">
  4.  
  5. <Application id = "com. rim. samples. device. httpdemo">
  6.  
  7. <Name> Sample Network Application </name>
  8.  
  9. <Description> Retrieves a sample page over HTTP connection. </description>
  10.  
  11. <Version> 1.0 </version>
  12.  
  13. <Vendor> Research In Motion </vendor>
  14.  
  15. <Copyright> Copyright 1998-2003 Research In Motion </copyright>
  16.  
  17. <Language langid = "0x000c">
  18.  
  19. <Name> Application d' using hantillon </name>
  20.  
  21. <Description> Obtenir une page du r sans eau
  22.  
  23. </Description>
  24.  
  25. </Language>
  26.  
  27. <Fileset Java = "1.0">
  28.  
  29. <Directory> samples/httpdemo </directory>
  30.  
  31. <Files>
  32.  
  33. Net_rim_httpdemo.cod
  34.  
  35. Net_rim_resource.cod
  36.  
  37. Net_rim_resource _ en. cod
  38.  
  39. Net_rim_resource _ fr. cod
  40.  
  41. </Files>
  42.  
  43. </Fileset>
  44.  
  45. </Application>
  46.  
  47. </Loader>

Nested Module

Create a nested structure in the. alx file to provide optional components for the application. Generally, the optional features provided by the nested module are not suitable for all users. You can choose whether to install these optional modules.


Nesting: creates an implicit dependency for the nested module of the basic application. to define an explicit dependency on other applications or libraries, use the <requires> flag.

Example: an application with a nested module. alx file example

 
  1. <loader version="1.0">  
  2.  
  3.     <application id="net.rim.sample.contacts">  
  4.  
  5.        <name>Sample Contacts Application</name>  
  6.  
  7.        <description>Provides the ability to store a list of contacts.  
  8.  
  9. </description>  
  10.  
  11.        <version>1.0</version>  
  12.  
  13.        <vendor>Research In Motion</vendor>  
  14.  
  15.        <copyright>Copyright 1998-2001 Research In Motion</copyright>  
  16.  
  17.        <fileset Java="1.0">  
  18.  
  19.            <directory>samples/contacts</directory>  
  20.  
  21.                   <files>  
  22.  
  23.                      net_rim_contacts.cod  
  24.  
  25.                      net_rim_resource.cod  
  26.  
  27.                      net_rim_resource__en.cod  
  28.  
  29.                      net_rim_resource__fr.cod  
  30.  
  31.                    </files>  
  32.  
  33.        </fileset>  
  34.  
  35.        <application id="net.rim.sample.contacts.mail">  
  36.  
  37.            <name>Sample Module for Contacts E-Mail Integration</name>  
  38.  
  39.            <description>Provides the ability to access the messaging application</description>  
  40.  
  41.            <version>1.0</version>  
  42.  
  43.            <vendor>Research In Motion</vendor>  
  44.  
  45.            <copyright>Copyright 1998-2001 Research In Motion</copyright>  
  46.  
  47.            <fileset Java="1.0">  
  48.  
  49.               <directory>samples/contacts</directory>  
  50.  
  51.               <files>  
  52.  
  53.                   net_rim_contacts_mail.cod  
  54.  
  55.               </files>  
  56.  
  57.            </fileset>  
  58.  
  59.        </application>  
  60.  
  61.     </application>  
  62.  
  63. </loader>  

Specifies the version of a BlackBerry device.

The _ blackBerryVersion attribute should be used to specify the supported BlackBerry device version for applications that use the APIs of the specified version of the handheld device software.

Use the following rule to specify a range:

Square brackets [] Description closed range matching

Parentheses () describe opening and closing range matching.

Lack of low circumference represents 0.

The absence of a high margin represents an infinite value.

For example, [4.0,) represents any version between 4.0 and infinitely large.

The following example prevents the module from loading software for handheld devices earlier than version 4.0.

 
  1. <Application id = "<application_id>" _ blackberryVersion = "[4.0,)">
  2.  
  3. ...
  4.  
  5. </Application>
  6.  
  7. The following example provides an Optional module for different versions of handheld device software.
  8.  
  9. <Application id = "<application_id>">
  10.  
  11. ...
  12.  
  13. <Fileset _ blackBerryVersion = "(, 4.0)">
  14.  
  15. ... Modules for handheld software versions earlier than 4.0
  16.  
  17. </Fileset>
  18.  
  19. <Fileset _ blackBerryVersion = "[4.0,)">
  20.  
  21. ... Modules for handheld software versions 4.0 and later
  22.  
  23. </Fileset>
  24.  
  25. </Application>

. Alx file elements

Element

Attribute

Description

Loader

Version

Loader contains one or more applicaiton Elements

The version attribute specifies the version of the Application Loader.

Applicaiton

Id

The application element contains elements for a single application.

The application element can also contain nested application elements. nesting allows you to: When an application is loaded, its prerequisite module is also loaded.

S. helloworld.

Library

Id

Library replaces the application tag

Name

Name provides a descriptive name for the application. This name is displayed in the Application Loader. It is not displayed on the BlackBerry device.

Description

The description element provides a brief description for the application. This description is displayed in the Application Loader. It is not displayed on the BlackBerry device.

Version

The version element provides a version number for the application. It is displayed in the Application Loader. The version number is only used to display information.

Vendor

The vendor element provides the company name for creating an application, which is displayed in the Application Loader.

Copyright

The copyright element provides copyright information, which is displayed in the Application Loader ..

Required

Required allows you to forcibly load an application. In the Application Loader, select an application installation. Add the following lines:

<Required> true <required>

The required flag is only used by the enterprise system administrator. It is not used by users of third-party applications.

Note: The BlackBerry desktop software 3.6 or later versions support this element.

Hidden

The hidden package of the hidden element is invisible to the user in the Application Loader. Add the following lines:

<Hidden> true

By default, it is combined with the required element to load the application. Or if an application has been loaded, set the required flag to load the package.

The hidden flag is only used by the enterprise system administrator. It is not used by users of third-party applications.

Note: The BlackBerry desktop software 3.6 or later versions support this element.

Language

Langid

When the Application Loader runs in the language specified by the langid attribute, the language mark allows you to overwrite the text displayed in the application.

To support multiple languages, specify multiple language tags. to specify the names, versions, vendors, and copyright of each language, nest them in the language tag. if no tag is nested, it is displayed in the default language.

The langid attribute specifies the Win32 langid language code for the language of the information application. for example, some Win32 langid codes are: 0x0009 (English), 0x0007 (German), 0x000a (Spanish), 0x00c (French ).

Requires

Id

The requires element is optional. It specifies the id of the package that the application depends on. If an application depends on more than one other application, the id can appear more than once.

When an application is loaded to a BlackBerry device, all the packages specified by <requires> are also loaded.

(Note: BlackBerry desktop software 3.6 or later versions support this element .)

Fileset

The fileset element contains an optional directory element and one or more files elements. it specifies a group in a separate directory. the cod file is loaded into the BlackBerry device. to load files under multiple directories. the alx file contains one or more fileset elements.

Java

The Java attribute specifies the minimum version of BlackBerry Java VM compatible with the. cod file. The current VM version is required by the version 1.0.Java attribute.

Radio

The radio attribute allows you to load different applications or modules. these programs or modules depend on the network type of the BlackBerry device. possible values include Mobitex, DataTAC, GPRS, CDMA, and IDEN. the radio attribute is optional.

Langid

The langid attribute allows you to load different applications or modules. these programs or modules depend on languages supported by BlackBerry devices. the langid attribute specifies the Win32 langid language code for the language of the information application. for example, some Win32

Langid code: 0x0009 (English), 0x0007 (German), 0x000a (Spanish), 0x00c (French ).

Color

The color attribute allows you to load different applications or modules for color or black/white screens. It is a Boolean value; true indicates color; false indicates black/white.

Directory

The directory element provides the file location. The directory element is optional. If you do not specify the directory element, the file must be in the same directory as the. alx file. Specify the directory where the. alx file is located.

Files

Files provides applications with a list of one or more. cod files under a single directory and loads them to BlackBerry devices.

Note: Based on personal experience, the ALX generated by JDE is not ideal, especially complicated projects. So for a slightly complex project, you should manually edit it .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.