Installing MIDlet Suites

After users discover a MIDlet, they can choose to download it. The MIDP implementation handles the download and installation process, and should give users a chance to confirm that they want to install the MIDlet. If the MIDlet has a JAD file, the MIDP implementation should get information from it and display the information for the user during the confirmation request. The MIDP implementation should display at least the name, version, vendor, and size information, as shown in Screenshot.

Screenshot Confirmation Screen before a MIDlet Installation

Java graphics 13fig03.gif

The app developer puts the MIDlet suite's name, version, vendor, and size into the JAD file. (See "Getting Information on MIDlet Suites" on page 194 for more information.)

app Developers

Recommend: Java graphics bulb2_icon.gif Name your MIDlet suite and MIDlets so that users can tell what they contain. It can be difficult for users to remember what is in MIDlet suites with generic names like Demos and Examples. (Users will also see the name when the MIDlet suite is on the device. For example, it could appear in a list of apps to launch or delete.)

Recommend: Java graphics bulb2_icon.gif Make the first several characters of your MIDlet suite name unique. Your app will probably be in a list with other apps, and the user may only see the first several characters of your name. If your company name is at the beginning, and you have more than one app in the list, users will not be able to easily distinguish one of your apps from another. If you want to include your company name in the MIDlet suite name, put it at the end. For example, use "MyMidlet by MyCompany" instead of "MyCompany MyMIDlet."

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Do not charge users for downloading a JAD file. After downloading the JAD file and using the information to create a confirmation dialog, the user might choose not to install the MIDlet. Instead, apply the charge when the user installs the MIDlet suite's JAR file.

Consider: If the user chooses to install a MIDlet suite already on the device, gracefully change from an installation to an update. For example, the MIDP Reference Implementation uses the message in the third screen of Screenshot to ask the user whether to install a MIDlet suite when the device already has the same version installed. (See "Updating MIDlet Suites" on page 197 for more information updating MIDlet suites.)

Screenshot Changing From Installation to Update of a MIDlet Suite

Java graphics 13fig04.gif

If the user decides to install the MIDlet suite, the MIDP implementation downloads the JAR file and proceeds with the installation.

Recommend: Java graphics bulb2_icon.gif Put an abstract command on the Installation screen to stop the download and installation of a MIDlet suite. If the user chooses the Stop command, revert the device to the state that it was in at the start of the installation procedure.

After the installation reaches a point where it cannot be stopped, remove the Stop command from the screen. For example, remove the command after the download of the JAD and JAR files has completed, and the device is finishing the installation locally. Screenshot shows the screen used by the MIDP Reference Implementation.

Screenshot Screen for Finishing an Installation

Java graphics 13fig05.gif

If the user decides not to use the MIDlet after the Stop command is taken off the screen, the user has to remove the MIDlet suite from the device instead of merely stopping the installation.

Recommend: Java graphics bulb2_icon.gif If you find a problem that keeps you from installing the MIDlet suite, give the user a clear error message. For example, tell the user if the device does not have enough memory, or the JAR file is corrupt, or there is a connection conflict with a static port registration. If possible, help the user solve the problem. For example, if there is not enough memory, you could show the user where memory is being used so that they have the option to free up space. Screenshot shows an error message from the MIDP 2.0 Reference Implementation.

Screenshot Error Message for a MIDlet Installation Problem

Java graphics 13fig06.gif