Valid XHTML 1.0 Transitional

Development task: Supporting "Loadable Dictionaries" - using DictionaryforMIDs on devices with small JAR-sizes

Background

Many entry level cell phone models support only small JAR-file sizes, for example a few hundred kB. The dictionaries files that are incorporated into the DictionaryForMIDs_xxx.jar application JAR-file are often a few MB in size, so these dictionaries cannot be installed on those models.

But usually there are several MB of free space in the file system of the cell phone ! So let's put the dictionary there !

Basically all new models that appear on the market support JSR 75, including Nokias popular Series 40 3rd edition. JSR 75 specifies a portable way of accessing the file system of a cell phone/PDA. By using the JSR 75, the DictionaryForMIDs_xxx.jar-file (this file contains the dictionary files) can be put in the file system of the phone and the dictionary files can be read from there. The DictionaryForMIDs_empty.jar (application JAR-file) does contain only the program code and is much smaller (approx. 100 kB).
 


Accessing the file system - alredy implemented !

The access to the file system is already implemented since version 3.1.0. The class JSR75InputStream does the access via the JSR75 API. All other relevant classes have also been extended, so that by now there is a working framework for accessing the files in the file system. For how to use the current implementation, the FAQ.
 

Who does the main job ?

The main that job still needs to be done and consists of the following 3 tasks:

  1. Reading the JAR files with a zip library.
  2. Implementing a 'file selection' dialogue
  3. Taking care for the certification

Update 31-Oct-2007: Joshua started working on point 1 (reading the JAR file) and 2 (implementing a 'file selection' dialogue). Actually Joshua did already do a big part of the job (it's almost complete !), read in the forum this posting. Unfortunately Joshua could not yet complete his work; the last version of his source code can be downloaded here:http://www.kugihan.de/diverse/Joshua_Koo_JSR75/DictionaryForMIDs.rar
 

Reading the JAR-files

The dictionary files are read from the normal DictionaryForMIDs_xxx.jar-files that are downloaded from the dictionary download page. JAR-files are normal zip-files. There are a few free Java ME/MIDP/CLDC zip-library implementations around. Someone needs to look at those libraries, pick the best one and possibly adapt it (check specifically for the license statement of the library, so that it can be used with DictionaryForMIDs).

Here are a few candidates for a Java ME zip library (there may be several others also !):
JZlib may be an interesting candidate, see http://www.jcraft.com/jzlib/.
The people from ReadManiac use a Java ME ZIP library which could be interesting.
Also the library from the GNU Classpath project might be useful.

A hint on the implementation: the DictionaryForMIDs JAR files are several MB in size, so one-time loading of the complete JAR file on the heap is not a working solution. Instead only the single searchlist/index/directory files should be read from the JAR file.
 

Implementing a 'file selection' dialogue to let the user select a JAR-file

The user shall be able to pick within DictionaryForMIDs a DictionaryForMIDs_xxx.jar-file that he downloaded from the dictionary download page and did copy on the file system of his cell phone/PDA. Currently the path has to be entered in text form (see FAQ for more). For the future this needs to be improved so the user is able to browse the file system of his device and select the DictionaryForMIDs_xxx.jar-file (i.e. the dictionary) that he wants to use. For this a 'mini'-file system explorer should be implemented.
 

Certification

Because the file system is accessed, the DictionaryForMIDs application needs to be signed with a certificate. Otherwise, on most devices, the user will be prompted a confirmation dialogue each time when a file is accessed. For detailed information on this see the Recommended Security Policy for GSM/UMTS devices.

For this certification task it needs to be analysed whether somehow DictionaryForMIDs can obtain a certificate - under conditions that are suitable for an Open Source project ! A commercial certificate is expensive, for example a VeriSign code signing certificate costs about $500 per year.
 

Questions or comments ?

As always, contact us if you have questions !