USERNAME PASSWORD LOST PASSWORD? REGISTER
"A Complete Mobile Application Development Environment"
Advertisement

Downloads
Documentation
Forums
Blog
Press
Bug Tracking
Creator IDs
Contact Us




Manifest File Reference PDF Print E-mail

An ACCESS Linux Platform native bundle is represented as a folder—or as a .bar file, which is a single file that contains an image of that folder—which contains a manifest file named Manifest.xml at its root. A manifest specifies a set of properties associated with the bundle. The manifest file uses an XML format to specify those properties.

While the contents of a given manifest can be somewhat generic and of interest largely to the executable inside the bundle, there are a couple of properties that are relied upon by various ACCESS Linux Platform components.

Manifest File Structure ^TOP^

A manifest file should be in this form:


<manifest name="foo.bar"> 
	<a> 
		<b>1</b> 
		<c>2</c> 
	</a> 
	<a> 
		<x></x> 
	</a> 
	<other> 
		<somevalue/> 
	</other> 
</manifest> 

Any elements within the manifest at the third level ("b", "c", and "x" in the above example) are registered as bundle properties. Specifically, in the above example the following would be registered:

Property

"Which"

Key

Value

a

0

b

1

a

0

c

2

a

1

x

""

other

0

some value

""

To retrieve the value of a bundle property, supply the property name, "which" value, and key to alp_bundle_property_value().

Any second-level elements not containing third-level elements, or any elements otherwise not conforming, are ignored for the purpose of generating bundle properties. They don't prevent the bundle from being accepted, however.


IMPORTANT: Element names and values (properties, keys, and values) are case-sensitive.

The <manifest> Element ^TOP^

The manifest file must have an outermost <manifest> element, which can have these attributes:

name
this attribute is the only one which is required. It contains the name of the bundle. It should not start with "bar:"; that part of the name is implied.
version
the version of the bundle itself. Do not confuse this with the version of the application or preference panel, which is specified using the <about> element. This attribute is optional, and if present should be an integer. If not present, the bundle's version is assumed to be 0.

The Bundle Manager allows you to install multiple bundles with the same name. Which one of these is chosen to "own" the bundle name and thus take priority over the others is recomputed each time a bundle that could affect the decision is installed or removed (but not when the application within the bundle is invoked). Of the competing bundles, the one with the highest version number "wins."

arch
this attribute is optional, and if present should be a string indicating which architecture this bundle is intended for.
desired_filename
this attribute is optional, and if present indicates the file name which should be used to convert the bundle to an image file. The name given will have the .bar extension appended to it.
searchpath
this attribute is optional. If present, it should be a string in the form of a set of colon-separated path prefixes, potentially containing "^l" to indicate a locale fill-point. This affects how localized resources are searched for. If not present, it defaults to "/rsc/^l/:/".
textdomain
this attribute is optional. If present, it defines the default gettext domain applied to code running from this bundle. It should be a string potentially containing "^n"or "^N". The former is mapped to the bundle name without the scheme prepended (for instance, "com.companyname.appname"), while the latter is mapped to the complete bundle name (such as "bar:com.companyname.appname"). If not present, this attribute defaults to "bar-^n".
bindtextdomain
this attribute is optional. If present, it defines the directory to which the gettext domain is bound. It should be a string which defines a path relative to the base of the bundle. If not present, this attribute defaults to "rsc".

Resource File Paths ^TOP^

The resource files associated with ACCESS Linux Platform native bundles map directly to the contents of the bundle's folder. A path starting with a slash is a "fixed path", and matches only that exact file within the bundle: /rsc/MyView.xml. A path starting without a slash is looked up through the locale search path, which can translate "MyView.xml" into "/rsc/en_US/MyView.xml", as appropriate.

Note that the use of a leading slash to distinguish fixed paths from localized paths means that you might need to use two slashes in URL syntax:


bar:com.access.apps.memo//my/filename 

There is one "magic" resource syntax specifically supported by ACCESS Linux Platform native bundles. The translation syntax is:


^t/Some string 

This path will be retrieved by taking the part of the path after the slash, and feeding it through gettext() to perform a translation to the current locale. The result of the translation is considered the "contents" of the resource.

In URL syntax:


bar:com.access.apps.memo/^t/MemoPad 

Applications and Preference Panels ^TOP^

While there are a number of properties that can be used in an application's manifest file, most applications have manifests that look something like this:


<manifest name="com.access.apps.sample"> 
	<application> 
		<name>Sample</name> 
		<icon>icon_sample.png</icon> 
  </application> 
</manifest> 

The <application> Element ^TOP^

Applications and preference panels both use an <application> second-level element. Additional information about the application—most importantly, the application's version number—is specified using a separate element: see "The <about> Element" for details.

The following third-level elements have meaning to various ACCESS Linux Platform components when they fall within the <application> element:

name
Specifies the application name to display in the launcher, or the name of the preference panel. Unless the application is marked as "hidden," this element should be supplied.

<name>Calculator</name>

icon
Path to the file containing the application's or preference panel's icon. See "Resource File Paths" for information on specifying this path. Unless the application is marked as "hidden," this element should be supplied (although it is not strictly required, if you don't supply an icon the Launcher will only display the application's name; the space allocated for the icon will be left blank).

<icon>calc.png</icon>

backgrounding
Specifies the behavior of the application or preference panel when the Application Server launches another application or preference panel as primary. This element can have one of four values: unsupported, required, supported, or preferred.

unsupported is the default value and indicates that the application or preference panel should only be launched as the primary application, and should be shut down if another application becomes primary.

required indicates that when the new primary application is launched, this application needs to be left running in the background. The Application Manager always tries to leave these applications running, so they need to be extremely careful with resource usage.

supported indicates that the application can be run in either the foreground (as the main UI application) or in the background. Currently, applications that are so marked are launched as the primary application and are shut down when an application switch occurs; they are not left running in the background.

preferred indicates that the application prefers to run in the background as long as resources are available, but does not require it. Currently, applications that are so marked are launched as the primary application and are shut down when an application switch occurs; they are not left running in the background.

<backgrounding>required</backgrounding>

default-category
Specifies the launcher category for the application. If this element is not specified, the application is "unfiled".

<default-category>Multimedia</default-category>

Default_env
Specifies environment variables and the values to which they should be set prior to running the application or preference panel. Specify each variable and value using the form "variable=value;" as shown in this example:

<Default_env>Name=ducky;lang=C;</Default_env>

description
A textual description of the preference panel or application. This element should be supplied for preference panels. The application launcher currently does nothing with the contents of the description element, so this element isn't necessary for applications.

<description>Test pref panel #2
</description>

enable-theme
Indicates whether or not the theming engine should be employed when rendering the user interface elements of the application or preference panel. Theming is enabled by default, so omitting this element is equivalent to specifying a value of true.

<enable-theme>false</enable-theme>

entry
Specifies the entry point for the application or preference panel. Normally the shared object is loaded and then execution begins at alp_main(); this element allows you to specify an alternate entry point. Programmatically you can determine the entry point of the currently-running code with alp_bundle_acquire_entrypoint().
FindVersion
Set this element to 1.0 to make this application's data searchable using ACCESS Linux Platform's system-wide find feature.

<FindVersion>1.0</FindVersion>

hidden
Prevents the application or preference panel from being shown in the launcher. Note that applications that are marked "hidden" still show up in the jump list; see the jump-list element for information on keeping an application out of the jump list.

This element can take a value of either true or false. The default is false; by omitting this element you are indicating that the application or preference panel is not to be hidden.

<hidden>true</hidden>

jump-list
The jump list is a list of recently-used or particularly important applications. Applications are normally placed into the jump list at the time they become the primary application. You can use the jump-list element to change this behavior, forcing an application to always appear in the jump list (supply a value of always) or preventing it from ever appearing in the jump list (supply a value of never). Note that this element is for use with applications only; preference panels never appear in the jump list.

<jump-list>never</jump-list>

prefpanel
Indicates that this is a preference panel. The default value for this element is false; omitting this element entirely indicates that this is an application.

<prefpanel>true</prefpanel>

transient
Transient applications are ones that should be go away (either shut down or move to the background) when the primary application changes. Transient applications are separate applications that appear to be part of the current application. For example, preference panels are typically marked as transient. If the main application opens a preference panel, both should go away if the user switches to another main application while the panel is still open.

This element can take a value of either true or false. The default is false; by omitting this element you are indicating that the application or preference panel is not transient.

<transient>true</transient>

vendor
Allows you to identify the vendor of the application or preference panel.

<vendor>MyCompany, Inc.</vendor>

The <about> Element ^TOP^

The <about> element allows you to specify information that is to appear in the application's About dialog and in the Launcher. This element is optional.

The following third-level elements have meaning to various ACCESS Linux Platform components when they fall within the <about> element:

version
Specifies the version of the application or preference panel. If the <version> element is omitted, an About dialog displayed with alp_about_dialog_run() won't present any version information. Note that this version differs from the version specified in the manifest element; the manifest element version specifies the version of the bundle itself. In order to specify the version of your application you need to follow the <application> element with an <about> element that contains a <version> element.

<version>0.1</version>  

copyright
The copyright notice to be associated with the application. About dialogs displayed using alp_about_dialog_run() will include the specified copyright notice. If the <copyright> element is omitted, an About dialog displayed with alp_about_dialog_run() won't present a copyright notice.

<copyright>  
    Copyright (c) 2006 ACCESS Systems Americas, Inc. All rights 
reserved.  
</copyright>  

logo
Path to the file containing the icon to be displayed in the application's About dialog. See "Resource File Paths" for information on specifying this path.

IMPORTANT: If this element is omitted, and if the About dialog is displayed by calling alp_about_dialog_run(), an ACCESS logo will be displayed in the About dialog.

<logo>memocorp.png</logo>

vendor
The name of the application's vendor.

<vendor>ACCESS Systems Americas, Inc.</vendor>  

The <notifications> Element ^TOP^

The <notifications> element, which lies outside of the <application> element, enables the application to receive a notification when the application is registered with the Application Manager server. Registration happens when the application is installed to the device. Thus, by specifying this element your application is executed when it is first installed (not as the primary application, however). This allows you to initialize settings or create application databases before the application is executed by the user for the first time. It is also where many applications register for additional notifications.

The <notifications> element should be specified as shown here:


<notifications> 
	<register/> 
</notifications> 

The <extractor> Element ^TOP^

An extractor is a third-party library (either a stand alone bundle or part of an application) that extracts metadata from a media file of a particular type. Here is a sample extractor manifest:


<extractor> 
	<library>libalp_vrecorder.so</library> 
</extractor> 
<extractor_for> 
	<extension>wav</extension> 
	<mimetype>audio/x-wav</mimetype> 
</extractor_for> 
<supplemental_for> 
	<extension>ogg</extension> 
	<mimetype>audio/ogg</mimetype> 
</supplemental_for> 

One or more <extractor_for>, <supplemental_for>, or <thumbnailer_for> elements must follow the <extractor> element.

Each <extractor_for> element tells the cataloger that the extractor wishes to be called for a specific filetype. There should be one <extractor_for> element for each mime type supported by the extractor.

If an extractor can perform supplemental extraction, using the alp_extractor_process_file() entrypoint, it should have one or more <supplemental_for> elements. Such an extractor supplements the regular extractor and is run after the regular extractor to add any additional information to the metadata as necessary. Typically these are created by OEMs.

A <thumbnailer_for> element specifies that the extractor can generate a thumbnail or preview, usually in a format such as GIF or JPEG. Extractors that generate thumbnails must export the alp_extractor_generate_thumbnail() entrypoint.

The following third-level elements apply to the <extractor> element:

library
The standard bundle name of the extractor. This element is required.

The following third-level elements apply to the <extractor_for>, <supplemental_for>, and <thumbnailer_for> elements. Both <extension> and <mimetype> are required in each case.

extension
A required element that specifies the supported filename extension. For instance, "wav" indicates that the extractor supports WAV files.
mimetype
A required element that specifies the supported mime type. For instance, "audio/x-wav".

The <export> Element ^TOP^

The <export> element is primarily used when a bundle wants to export a shared library for others to use (use a <reference> element—described under "The <reference> Element"—to reference the exported shared library). The <export> element can also be used to indicate that one or more directories and .jar files be added to the CLASSPATH environment variable while the bundle is open.

Bundles can contain shared libraries as well as applications. A bundle can export more than one library, and a given library can be exported with multiple names. Consider the following simple manifest file:


<manifest name="package.test"> 
	<export><library>lib/somelib.so</library></export> 
	<export><library>lib/somelib.so</library><as>fred.so</as></export> 
</manifest> 

lib/somelib.so is a path within a bundle. It can be an arbitrary shared library that has been placed into the bundle. As directed by the first <export> element in the above example, the Bundle Manager will place a symbolic link named somelib.so into a common shared library path whenever theþpackage.test bundle is open.

The second <export> element shows how you can override the exported name of the shared library. In this example, the name in the shared library path will be fred.so, which will be a symbolic link to lib/somelib.so inside the bundle.

As demonstrated in the sample manifest file, above, the <export> element can appear multiple times within a single manifest, if needed. Any bundle can export a shared library.

The following third-level elements apply to the <export> element:

library
Causes a library exported from this bundle to be made available whenever the bundle is open. Other bundles reference this library through the use of a <reference> element. This element is required in order to export a shared library.

<library>somelib.so</library> 

as
This optional element specifies the name to be used for the exported library. If this element is not included, the library is exported using the actual name of the library (which specified by the <library> element).

<as>lib_somelib.so.3</as> 

classpath
Adds an entry (either a folder or .jar file) to the CLASSPATH environment variable while the bundle is open.

<classpath>lib/myclass.jar</classpath> 

The <reference> Element ^TOP^

The <reference> element indicates that this bundle has a dependency upon another bundle. It is typically used when another bundle exports a needed shared library. When this bundle is opened, the Bundle Manager will automatically open any referenced bundles.

The <reference> element can be used in any bundle; it is not limited to bundles that contain applications.

Here is a sample manifest that references another bundle:


<manifest name="bundle.a"> 
	<reference> 
		<to>bar:bundle.b</to> 
	</reference> 
</manifest> 

The above demonstrates a mandatory reference. Upon opening this bundle, bar:bundle.b is automatically opened. If it cannot be opened, then the open of bundle.a itself fails.

The following illustrates an optional reference:


<manifest name="bundle.a"> 
	<reference> 
		<to>bar:bundle.c</to><optional/> 
	</reference> 
</manifest> 

This bundle will be opened even if the named target bundle is not available.

The following third-level elements apply to the <reference> element:

to
Names a bundle to be opened when this bundle is opened.

<to>anotherBundleName</to> 

optional
Indicates that the referenced bundle is optional; whether or not the referenced bundle can be opened, this bundle will be opened. Without this element, if the referenced bundle cannot be opened, this bundle will fail to open.

<to>bar:bundle.c</to><optional/> 

Phone Drivers ^TOP^

<manifest name="com.access.phonedriver.ggsd">

<phonedriver>

<name>Gsm Gprs Standard Driver</name>

<library>libalp_pdrv_ggsd.so</library>

<mux>false</mux>

</phonedriver>

</manifest>

Connection Manager Plug-Ins ^TOP^

<manifest name="com.access.cnc.bluetooth">

<cnc>

<library>libalp_cnc_bluetooth_core.so</library>

</cnc>

<cnc_ui_gtk>

<library>libalp_cnc_bluetooth_gtk.so</library>

</cnc_ui_gtk>

</manifest>

Postal Kit Plug-Ins ^TOP^

<manifest name="com.access.postal.plugin.ui.sample">

<postal>

<name>Mgr</name>

<version>1</version>

<id>0</id>

<uilibrary>libalp_postal_plugin_ui_mgr.so</uilibrary>

</postal>

</manifest>

Exchange Manager Plug-Ins ^TOP^

<manifest name="com.access.exchange.irda">

<exchange>

<name>Infrared</name>

<icon>icon-108.png</icon>

<nameid>irda</nameid>

<library>libalp_exgirdatransport.so</library>

<libraryui>libalp_exgtcptransportui.so</libraryui> //not in most: this is in .exchange.tcp

<libraryclient>libalp_exgtcptransportclient.so</libraryclient> //not in all: this is in .exchange.tcp and .exchange.local

</exchange>

</manifest>

Status Gadgets ^TOP^

<manifest name="com.access.statusgadgets.download">

<statusgadget>

<name>alp_download_gadget</name>

<library>libalp_download_gadget.so</library>

<DownloadIcon0>alp_download_gadget.png</DownloadIcon0> //these are gadget-specific

<AlertIcon>attention-108.png</AlertIcon> //this one too

</statusgadget>

<statusslip> //this whole section isn't in all: its in .statusgadgets.clock and a bunch of others

<name>alp_clock</name>

<library>libalp_clock.so</library>

<enable-theme>true</enable-theme>

</statusslip>

</manifest>

Multimedia Extractors ^TOP^

<manifest name="com.access.extractors.mp3">

<names>

<extractorlib>libalp_mp3.so</extractorlib>

<thumbnailextractor>false</thumbnailextractor>

</names>

<extractor_for>

<extension>mp3</extension>

<mimetype>audio/mpeg3</mimetype>

</extractor_for>

</manifest>

Telephony Multiplexers ^TOP^

<manifest name="com.access.phonemux.etsi0710">

<phonemux>

<name>ETSI 07.10</name>

<library>libalp_phone_mux_etsi_0710.so</library>

</phonemux>

</manifest>

Telephony UI ^TOP^

<manifest name="com.access.libraries.telephony_ui">

<telephony_ui>

<name>Telephony UI</name>

<library>libalp_telephony_ui.so</library>

</telephony_ui>

</manifest>

Components ^TOP^

<manifest>

<component local="FlightModeService">

</component>

</manifest>

Add-Ons ^TOP^

<manifest>

<addon name="PSTelephonyEnabler" type="enabler" outlet="com.palmsource.plugins.flightmode" />

</manifest>

 

Add as favourites (52) | Quote this article on your site | Views: 574

Comments (1)
RSS comments
1. Written by Scooter on 08-05-2008 14:14 - Registered
 
 
Unknown Format
I have an Access Powered Treo 755p for end unit testing. 
Complied all the examples, all work fine on the simulator, but try deploying them. 
 
.bar and .so Native files ----- "Unknown Format" 
 
.jar and .jad JVM-Lite files ------ "Unknown Format" 
 
Simulators are great, but are worthless unless the app can be deployed. 
 
Native / Java on Access Linux powered Treo 755p, doesn't work! 
 
Please HELP!!! 
 
My boss doesn't believe it doesn't work, but IT DOESN"T WORK!!! 
 
HELP!!! 
 
TIA  
 
:cry :? :( :x
 

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Homepage
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code
I wish to be contacted by email regarding additional comments

Powered by AkoComment Tweaked Special Edition v.1.4.6
AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com
All right reserved

 


© 2008 ACCESS Developer Network    |    Joomla! is Free Software released under the GNU/GPL License.    |    ACCESS Global Website
Events Support Community Platforms Home