MLE-API Tasks - Using the preprocessing features of J2ME-Polish
J2ME-Polish Preprocessing of the Java Source code:
The MLE is build with J2ME-Polish and uses the preprocessing feature to create multiple versions of the application to fit exactly the device specifications. So the MLE application version for the Sony-Ericcson P990 includes different features (and a different Java code) then the MLE application version for the Nokia N95. The reason for that is, that the P990 has a touch screen which the N95 has not, and the N95 has multiple J2ME-APIs (location-api, fileio-api, ...) which the P990 doesn't has.
How the preprocessing is done is explained here and a list of variables and directive symbols can be found here.
Here is a short list of the most important directives if you want to use special features (like access to the filesystem, bluetooth, location info, multimedia recording and playback, ...) which depend on optional J2ME APIs (fileio-api, bluetooth-api, location-api, mmapi, ...):
|FileIO-API||//#if project.use.fileio && (polish.api.pdaapi || polish.api.fileio)||Checks if the fileio features are activated for the current build and if the device has the fileio-api. Used for accessing and manipulating the file system of the local phone.|
|BT-API||//#if project.use.bt && polish.api.btapi||Checks if the bluetooth features are activated for the current build and if the device has the bt-api. used for Bluetooth functionallity.|
|Location-API||//#if project.use.location && polish.api.locationapi||Checks if the location features are activated for the current build and if the device has the location-api. Used for getting location based infos|
|| MMAPI || //#if polish.api.mmapi && project.present.media || Checks if the media features are activated for the current build and if the device has the mmapi. Used for audio/video playback and the multimedia-recording. ||