Motorola C450, C550, C370 technical manual Program and Data space notes

Page 16

No more than ~500 files are used by installed MIDlet suites.

JAR size listed in JAD matches actual JAR size.

MIDlet suite name and MIDlet vendor are 32 bytes max

MIDlet suite version must be higher than an already installed one.

Even though the Data and Program Space in Java System indicate more available space than the size of a particular JAR file, it doesn't necessarily mean the JAR will install. Moreover, if it is able to install, there’s no guarantee the MIDlet will execute because on occasion, more RAM is required for execution than installation. In addition, MIDlets that will not install or execute on the phone because of lack of memory will most certainly execute on the Sun Wireless Toolkit since the PC has virtually unlimited memory with respect to the size of MIDlets.

The memory requirements for MIDlet suite installation are the following:

First, there must be enough Data Space (file system space) to temporarily store the JAR. If there's not enough Data Space, the browser (in the OTA mechanism) will display the error "Insufficient Memory".

Secondly, there must be enough heap memory to uncompress the JAR file. The JAR size should be a predefined safe proportion of the heap size. The JAR maximum size recommended is 100K. This means that MIDlet typically will not install if the JAR is greater than 100K. There are exceptions to this and it depends on how many class files vs. resource files are contained within the JAR. If there's not enough heap, the device will typically display the message "Memory Full".

Third, there must be enough Data Space to store not only the temporary JAR but also all the resource files needed by the MIDlet. The JAR is essentially a zip file that must be uncompressed. It contains class files (the actual application) and resource files that are used by the MIDlet. These resources typically include, png images, database files and any other data the MIDlet needs. These resource files are stored in the Data Space during installation. The JAR is deleted after the installation phase completes. If there's not enough Data Space, the device will typically display the message "Memory Full". Also, note that total size of the uncompressed resources in the JAR doesn't necessarily equal the Data Space occupied by that MIDlet once installed.

Fourth, there needs to be enough Program Space to store the actual MIDlet. The class files in the JAR are the application files and are converted into a native format and stored in the Program Space during installation. This native format size will be greater than the total of the uncompressed class files in the JAR. Once stored in the Program Space, the MIDlets are referred to as DAV Objects. DAV reserves additional Program Space equal to the largest DAV Object. This reserved space cannot be used for additional MIDlets. Its purpose is to provide power loss protection during a DAV reclaim of the flash memory. The allocation of this reserved Program Space is often a point of confusion with users. When the largest DAV object is installed, the Program Space in Java System will be reduced by more than the size of Program Space in Suite Details. Java System shows the free Program Space. Suite Details shows the amount of Program Space occupied by that MIDlet.

Program and Data space notes:

To check Program and Data space from the Java menu, select “Java System” and press the “Select” soft key.

Image 16
Contents Technical Manual Table of Contents Lcdui JAD Attributes Introduction PurposeAudience DisclaimerReferences Revision History Definitions, Abbreviations, AcronymsDate Name Reason Acronym DescriptionDocument Overview Introduction J2ME Introduction Java 2 Platform, Micro Edition J2MEMotorola J2ME Platform Resources AvailableDescription Display NetworkingFile & RMS Java VMGuide to Development in J2ME Developing and Packaging J2ME ApplicationsIntroduction to Development Page Installation OTA ProcedureDownloading Applications Program and Data space notes Starting Applications Java Application Installer/De-Installer JaidExiting Applications Launching Web Session for Http Download Error ChecksDownloading MIDlets XML Screen Renderings BombMan is back, now on your Taichi series of handsets Taichi handset New Games Application Management MIDlet LifecycleMIDlet Suite Installation MIDlet Suite De-installation MIDlet Suite Updating DestroyAppMethod Caller PurposeStartApp or the pauseApp Using startApp Java System MIDlet Control of MIDlet State TransitionsPage Network API Network ConnectionsClass Descriptions IOException when it detects a time-out condition URL FormatUDP Sockets TCP SocketsImplementation Notes Network API Lcdui DescriptionLcdui Functional Description Gaming API and SoundClass Hierarchy Using BackgroundMusic BackgroundMusic ClassBackgroundMusic Methods Gaming API containing a sound APIGameScreen Class GameScreen FieldsGameScreen Methods Public int getKeyStatesInformation, disabling key events can improve performance Using GameScreen GameScreenImageUtil Fields ImageUtil ClassImageUtil Methods Using ImageUtil RgbDataPalleteImage Constructor PalleteImage ClassPalleteImage Methods Using PalleteImage Public void setTransparentIndexint index throwsUsing Static and Animated Tiles PlayField ClassDefining View Windows Using SpritesPlayField Constructor 2N+1 2N + PlayField Methods Public void addSpriteSprite s throwsPage Public boolean collidesWithAnyTileSprite s throws Using PlayField PlayFieldUsing SoundEffect SoundEffect ClassSprite Class SoundEffect MethodsSprite Drawing Animation FramesSprite Constructor Sprite Methods Page Public final void drawGraphics g throws FileFormatNotSupportedException Using SpriteSprites Java Gaming Sound API Max Midi Extension SupportFileFormatNotSupportedException Constructors Java Gaming Sound APIVibe and Backlight Vibe and Backlight APIOverview Creating a MessageSending a Message PermissionsJAD Attributes JAD AttributesMandatory attributes for manifest files MIDlet-Name Record Management System Class DescriptionCode Examples RecordStoreTips CaveatsPhonebook Access Phonebook Access APIPhonebook Access API Permissions Sample of code to create object of PhoneBookRecord classSimmemory Sample of code for calling of ‘getMaxEmailLength ’ method Sample of code for calling of ‘isPrimaryint speedNo’ method Sample of code for calling of ‘getNumberCategories’ method Sample of code for calling of ‘setCategoryView’ method Sample of code for calling of ‘getUsedRecords’ method Int index = ReceivedRecord.getRecord1 ITAP Intelligent Keypad Text Entry APIAppendix a Key Mapping Key Mapping for the C370, C450, and C550Center Select END Appendix B Memory Management Calculation Available MemoryOnline FAQ Appendix CAppendix D Spec Sheets C370, C450, and C550 Spec SheetsDocumentation Motorola Developer Information ToolsReferences Purchase Motorola Developer Information Tools Motorola, Inc
Related manuals
Manual 110 pages 1.04 Kb