Download





Getting Information on MIDlet Suites

MIDP Implementors

Recommend: graphics/bulb2_icon.gif Give users a way to see information about a MIDlet suite, such as its version number, the names of its MIDlets, how much memory it is using, and so on. (See Chapter 15 for information on Security, and how to present it to the user.) For example, Figure shows information about a MIDlet installed on a mobile phone.

13. Information about the Games MIDlet Suite

graphics/13fig13.gif

Recommend: graphics/bulb2_icon.gif If the device has a standard mechanism for giving users information about the native applications, leverage that mechanism for providing information about MIDlet suites. The MIDP 2.0 Specification [19] requires that you provide the version number, but you do not have to provide all the information shown in Figure. For example, Figure shows Sun's MIDP for Palm OS, which uses the standard Palm OS Information screens, although it means that the names of the MIDlets in the suite are not listed.

14. Palm OS Information on the Games MIDlet Suite

graphics/13fig14.gif

1 JAD File Attributes

The Java application descriptor (JAD file) is one way that an application developer provides information to the MIDP implementation. The MIDP implementation presents the information in the JAD file to the user to confirm that the user wants to install the MIDlet suite. The JAD file can also hold information for the MIDlets themselves. (The manifest of the JAR file can also provide information. See "JAR File Attributes" on page 196.)

Application Developers

Strongly Recommend: graphics/bulb1_icon.gif Provide a JAD file as part of your MIDlet suite package. A JAD file is optional but very useful to the MIDP implementation, especially during the installation process.

If a JAD file is present, it must contain the MIDlet suite's name, version, vendor, JAR file URL, and JAR file size. It is permitted to contain a number of other attributes, such as a description of the MIDlet suite, and security-related information. (See the MIDP 2.0 Specification [19] for a full list of attributes; see Chapter 15 for more information on MIDP 2.0 security.)

Consider: If you provide a JAD file, consider including attributes that the MIDP implementation could provide to users to help them decide whether to use the MIDlet suite. For example, a description of the MIDlet, a URL where the user could get more information, and the names of the MIDlets in the MIDlet suite could be useful to the user.

MIDP Implementors

Consider: Consider providing additional information, if it is present in the JAD file, that would help users decide whether to install the MIDlet suite. For example, if there is a description of the MIDlet suite, include that in the confirmation dialog.

There are three additional attributes that can only appear in a JAD file (if the application developer provides them at all). These attributes give the following pieces of information to the MIDP implementation:

  • URL to use to report the new installation or the update of the MIDlet suite

  • URL to use to report the deletion of the MIDlet suite

  • Text message to show to the user when asking the user to confirm the deletion of the MIDlet suite

2 JAR File Attributes

The manifest of the MIDlet suite's Java archive (JAR) file is one way that an application developer provides information to the MIDP implementation. The manifest of the JAR file must contain the MIDlet suite's name, version, and vendor. It is also permitted to contain other information, such as the required J2ME™ profile, the registrations for MIDlets to handle inbound connections, MIDlet-specific information, and so on. The information is provided as a list of attribute-value pairs. (See the MIDP 2.0 Specification [19] for a full list of attributes.)

3 Interactions of Attributes in the JAD and JAR Files

If the MIDlet suite includes a JAD file, three attributes (the MIDlet suite's name, version, and vendor) must be present in both it and the JAR file's manifest. Their values must be identical or the device cannot install the MIDlet suite.

MIDP Implementors

Strongly Recommend: graphics/bulb1_icon.gif If the application developer puts any other attributes in both files, and the MIDlet suite is trusted, the values of the attributes must be identical or you cannot install the MIDlet. If the MIDlet suite is untrusted, use the value from the JAD file.

Either the JAD file or the manifest of the JAR file must contain the required J2ME platform configuration and profile, as well as the name, class name, and optionally the icon for each MIDlet in the suite.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows