MIDlet
Encyclopedia
A MIDlet is an application that uses the Mobile Information Device Profile
Mobile Information Device Profile
Mobile Information Device Profile is a specification published for the use of Java on embedded devices such as mobile phones and PDAs. MIDP is part of the Java Platform, Micro Edition framework and sits on top of Connected Limited Device Configuration , a set of lower level programming...

 (MIDP) of the Connected Limited Device Configuration
Connected Limited Device Configuration
The Connected Limited Device Configuration is a specification of a framework for Java ME applications describing the basic set of libraries and virtual-machine features that must be present in an implementation...

 (CLDC) for the Java ME environment. Typical applications include games running on mobile devices and cell phones which have small graphical displays, simple numeric keypad interfaces and limited network access over HTTP.
// Called to pause the MIDlet
public void pauseApp { }

// Called to terminate the MIDlet
public void destroyApp(boolean unconditional) { }

Application deployment

MIDlets are packaged together in suites inside a .jar
JAR (file format)
In software, JAR is an archive file format typically used to aggregate many Java class files and associated metadata and resources into one file to distribute application software or libraries on the Java platform.JAR files are built on the ZIP file format and have the .jar file extension...

file with a Manifest file
Manifest file
On the Java platform, a Manifest file is a specific file contained within a JAR archive. It is used to define extension and package-related data. It is a metadata file that contains name-value pairs organized in different sections. If a JAR file is intended to be used as an executable file, the...

 indicating which classes implement which MIDlet. As well as the Java classes, the .jar file can contain other resources such as images or sound files. A .jad
JAD (file format)
Java Application Descriptor files describe the MIDlets that are distributed as JAR files. JAD files are commonly used to package Java applications or games that can be downloaded to mobile phones...

file contains the location of the .jar as well as the list of MIDlets in the suite and other attributes.

The .jad file describing a MIDlet suite is used to deploy the applications in one of two ways. Over the air (OTA) deployment involves uploading the .jad and .jar files to a Web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 which is accessible by the device over HTTP. The user downloads the .jad file and installs the MIDlets they require. Local deployment requires the MIDlet files to be transferred to the device over a non-network connection, such as Bluetooth
Bluetooth
Bluetooth is a proprietary open wireless technology standard for exchanging data over short distances from fixed and mobile devices, creating personal area networks with high levels of security...

 or IrDa
IRDA
IRDA may refer to:* Infrared Data Association, in information and communications technology , a standard for communication between devices over short distances using infrared signals...

 and may involve device-specific software.

Bytecode verification

Due to the memory and processing power available on a device, the class verifier in the Mobile VM is much smaller and only performs a fast, incomplete class verification. The bytecode for the MIDlet classes must therefore be pre-verified by using a preverifier to annotate the class files to enable the Mobile VM to then run the resulting bytecodes. The resulting bytecodes are valid bytecodes because the annotations are using attributes of the bytecode to make the notes for the Mobile VM to read in doing its final incomplete class verification.

Restrictions

Unlike a Java applet
Java applet
A Java applet is an applet delivered to users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun's AppletViewer, a stand-alone tool for testing applets...

, a MIDlet is limited to use of the LCDUI rather than the more familiar widgets of AWT
Abstract Window Toolkit
The Abstract Window Toolkit is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes — the standard API for providing a graphical user interface for a Java program.AWT is also the GUI toolkit for a...

 and Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....

. There are also restrictions on the size of .jar files and the number of concurrent HTTP connections based on the MIDP specification.

See also

  • Mobile Information Device Profile
    Mobile Information Device Profile
    Mobile Information Device Profile is a specification published for the use of Java on embedded devices such as mobile phones and PDAs. MIDP is part of the Java Platform, Micro Edition framework and sits on top of Connected Limited Device Configuration , a set of lower level programming...

  • Connected Limited Device Configuration
    Connected Limited Device Configuration
    The Connected Limited Device Configuration is a specification of a framework for Java ME applications describing the basic set of libraries and virtual-machine features that must be present in an implementation...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK