The Source for Java Technology Collaboration


CDC AMS

Design Notes

The apprepository code in phoneME Advanced and the phoneME Advanced model did the following. It had the notion of an application repository area in the system, represented by a directory (also known as the persistent store root) that contained application code, icons, app descriptors, etc. This repository was central to the phoneME Advanced AMS. When the phoneME Advanced AMS first starts, it looks for all of the app descriptors (.app files) in the apprepository and creates an application object per app descriptor. The phoneME Advanced AMS uses an AppModule? object to represent each app in the system.

In a typical phoneME Advanced build, the build will provide an already-made apprepository directory so that you can run the AMS demo with its sample apps right away. It will place the .jar files, icon image files, and pre-made app descriptor files in the right spots, similarly to what would occur when doing a downloadable install. It made testing and giving demos to people much easier. By the way, all but one of our sample apps were Xlets on phoneME Advanced. The one that wasn't was an Xlet was a sample ticker app that was a main app and it always appeared as a bar on the bottom of the demo screen.

The apprepository code also worked with phoneME Advanced's support for OMAOTA. The AMS could download and install applications from a JSR 124 server. The AMS would call a discover() method (this is also known as the discovery app) to get info on all of the apps available for download. The user of the AMS then would select an application for download and the apprepository code would then install this application into the app repository area.

The apprepository directory structure looks like this:

repository.dir/apps -> contains .jar files

repository.dir/icons -> contains image files to represent an app

repository.dir/menu -> contains app descriptor files (.app files)

This is the sequence of events after the download takes place and during the installation:

1. The downloaded jar file is saved in a newly created directory below repository.dir/apps. The structure looks like this:

repository.dir/apps/bundle.name/bundle.name.jar

Example:

repository.dir/apps/TicTacToe/TicTacToe.jar

2. The icon image file used for the dowloaded app is extracted and placed into repository.dir/icons. Note that a downloaded bundle could contain multiple apps will multiple icon image files:

repository.dir/icons/icon.image.file

Examples:

repository.dir/icons/TicTacToe.png

3. An application descriptor (.app) file is created for each app in the bundle.

repository.dir/menu/app.name.app

Examples:

repository.dir/menu/TicTacToe.app

An application descriptor file (.app) contains key/value pairs that are read into the AMS as part of the AMS start sequence and converted in application objects for the AMS to use. Here are the contents of the TicTacToe?.app file:


### .app file descriptor for the TicTacToe? app ###

type=XLET

xletName=TicTacToe

path=apps/TicTacToe/TicTacToe.jar

title=TicTacToe

icon=TicTacToe.png

startup=no

menu=Games


-- Main.prasadsanagavarapu - 12 Nov 2006

Topic PhoneMEAdvancedCDCAMSDesign . { Edit | Ref-By | Printable | Diffs r1 | More }
 XML java.net RSS

Revision r1 - 15 Apr 2005 - 22:21:20 - Main.prasadsanagavarapu
Parents: WebHome > PhoneMEAdvanced