Motorola C450, C550, C370 technical manual MIDlet Suite Updating, DestroyApp

Page 25

5

Application Management

MIDlet Suite Updating

When a MIDlet Suite is de-installed, all of its resources are removed including any resources that were created by the MIDlets in the suite, such as RMS databases. If a user gets a new version of a MIDlet Suite, then the user can simply download that new version to the device that has the older version installed. Once the new version is downloaded, the user will have the option to update the MIDlet Suite, causing the old version to be de- installed, followed by the immediate installation of the new MIDlet Suite.

A newer version of the MIDlet Suite should know how to use, upgrade, or remove the data in the RMS databases created by older versions. This idea of forward compatibility should not be extended to backward compatibility, because the C370, C450, and C550 device will not allow a user to update a version of a MIDlet Suite with an older or equal version of that MIDlet Suite. If an older or equal version attempts to be installed, the C370, C450, and C550 will ignore the installation and launch the current version of the MIDlet suite.

Starting, Pausing, and Exiting: AMS Control of MIDlet State Transitions

A MIDlet has three different states: Destroyed, Active, and Paused. A MIDlet’s natural state is destroyed. The AMS typically controls the transition through these states. When a user decides to launch a MIDlet, the device puts up a screen indicating that the MIDlet is transitioning through these states. The AMS notifies MIDlets about state transitions by calling the MIDlet’s methods, startApp(), pauseApp(), and

destroyApp().

The figure below shows the MIDlet starting screen.

Note: This image reflects a 176 x 220 display for document readability purposes only. The C370, C450, and C550 maintain a 96 x 64 display.

The constructor of the MIDlet’s class that extends MIDlet is first invoked. Then its startApp() method is called to indicate that it’s being started. The MIDlet will have focus when its startApp() method finishes execution. If a MIDlet takes too long

25

Image 25
Contents Technical Manual Table of Contents Lcdui JAD Attributes Purpose IntroductionAudience DisclaimerReferences Definitions, Abbreviations, Acronyms Revision HistoryDate Name Reason Acronym DescriptionDocument Overview Introduction Java 2 Platform, Micro Edition J2ME J2ME IntroductionResources Available Motorola J2ME PlatformNetworking Description DisplayFile & 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 MIDlet Lifecycle Application ManagementMIDlet Suite Installation MIDlet Suite De-installation DestroyApp MIDlet Suite UpdatingCaller Purpose MethodStartApp or the pauseApp Using startApp MIDlet Control of MIDlet State Transitions Java SystemPage Network Connections Network APIClass Descriptions URL Format IOException when it detects a time-out conditionUDP Sockets TCP SocketsImplementation Notes Network API Description LcduiLcdui Functional Description Gaming API and SoundClass Hierarchy BackgroundMusic Class Using BackgroundMusicBackgroundMusic Methods Gaming API containing a sound APIGameScreen Fields GameScreen ClassPublic int getKeyStates GameScreen MethodsInformation, disabling key events can improve performance GameScreen Using GameScreenImageUtil Fields ImageUtil ClassImageUtil Methods RgbData Using ImageUtilPalleteImage Constructor PalleteImage ClassPalleteImage Methods Public void setTransparentIndexint index throws Using PalleteImagePlayField Class Using Static and Animated TilesDefining View Windows Using SpritesPlayField Constructor 2N+1 2N + Public void addSpriteSprite s throws PlayField MethodsPage Public boolean collidesWithAnyTileSprite s throws PlayField Using PlayFieldSoundEffect Class Using SoundEffectSprite Class SoundEffect MethodsSprite Drawing Animation FramesSprite Constructor Sprite Methods Page Public final void drawGraphics g throws FileFormatNotSupportedException Using SpriteSprites Max Midi Extension Support Java Gaming Sound APIFileFormatNotSupportedException Constructors Java Gaming Sound APIVibe and Backlight API Vibe and BacklightCreating a Message OverviewPermissions Sending a MessageJAD Attributes JAD AttributesMandatory attributes for manifest files MIDlet-Name Class Description Record Management SystemCode Examples RecordStoreCaveats TipsPhonebook Access API Phonebook AccessSample of code to create object of PhoneBookRecord class Phonebook Access API PermissionsSimmemory 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 Intelligent Keypad Text Entry API ITAPKey Mapping for the C370, C450, and C550 Appendix a Key MappingCenter Select END Available Memory Appendix B Memory Management CalculationAppendix C Online FAQC370, C450, and C550 Spec Sheets Appendix D Spec SheetsDocumentation Motorola Developer Information ToolsReferences Purchase Motorola Developer Information Tools Motorola, Inc
Related manuals
Manual 110 pages 1.04 Kb