The Mobile Information Device Profile and MIDlets, Part 5. O'Reilly Book Excerpts: J2. ME in a Nutshell.
The Mobile Information Device Profile and MIDlets, Part 5. Kim Topley. Editor's note: This is the final excerpt in a series from J2. ME in a Nutshell, focusing on the delivery and installation of MIDlets. Delivery and Installation of MIDlets. The MIDP specification creates the concept of a MIDlet, defines its lifecycle and its execution environment, and specifies the programming interfaces that a MIDlet can expect to be present on any conforming device. However, it currently does not address in any detail how the user should locate MIDlet suites, how MIDlet suites will be installed on a cell phone or a PDA, and what facilities are to be provided to allow the user to select and launch an installed MIDlet or to remove MIDlet suites from the device. These features are not covered in detail in the MIDP specification because they are largely device- specific.
Instead, it refers loosely to software that is intended for application delivery and management. The term Application Management Software (AMS) is generally used to describe the software components that take on this responsibility. The MIDP reference implementation provides an example AMS for the benefit of vendors porting the software to their own devices, and both the Wireless Toolkit and the MIDP for Palm.
OS product have their own AMS implementations, which allow software to be installed from two different sources: From a local host computer via a dedicated, relatively high speed connection. This mode of operation is particularly suitable for PDAs, which are typically associated with a desktop or laptop computer with which they periodically synchronize. Synchronizing backs up the user's data from the handheld onto the larger system and copies software and data in the other direction, as well. The MIDP for Palm. OS implementation is a good example of this, because its AMS allows MIDlet suites to be installed from a host PC during the synchronization process. Once the MIDlets are installed, they can be launched on the PDA in the same way as its native applications.
- You got to love this, some dude (risidoro) has created Intent Midlet Manager
Installer for Pocket PC! Which means that you can now install and run .
- Мобильный банк (PDA - версия). адаптированным для мобильных
устройств интернет-офисом: https://cabinet.rshb.ru/pda. Мобильный банк (
- . Практически все КПК и коммуникаторы на Windows Mobile умеют. и
смартфоны от HTC установлен эмулятор Java MIDlet Manager.
The same application management features are supported for MIDlets, so they appear to be almost the same as native applications. Over a network to which the device is connected.
This is the most common way in which MIDlets are downloaded to cell phones and similar wireless devices, although it is also applicable to network- connected PDAs. The process of deploying MIDlet suites over a network is referred to as over- the- air provisioning, or OTA provisioning for short.
OTA provisioning is not part of the MIDP specification, but it is likely to be the dominant mechanism for distributing MIDlets, and it will doubtless be included in the formal specification in the near future. An AMS that supports installation of MIDlets from an HTTP server is included in the Wireless Toolkit. Over- the- Air Provisioning. With OTA provisioning, MIDlet providers install their MIDlet suites on web servers and provide hypertext links to them. A user activates the links to download the MIDlets to a cell phone via a WAP or Internet microbrowser. Figure 3- 1. 0 shows the steps involved in a typical MIDlet installation. OTA provisioning as described in this section is not formally a part of the MIDP specification at the time of writing, but it is likely to be included in the next version of the specification.
Meanwhile, it has the status of best- practice recommendation. The process begins when the user fetches a page from the corporate web site of the (fictional) corporation ACME, Inc.
Запуск Java-Мидлетов на КПК - 4PDA. 193 +. SpiritN30, Будь добр, объясни,
как это ява мидлет запустить на КПК;). --------------------. . MP4-часы MultiSIM Авто инвертеры Автомобильные держатели Адаптер
для 2 SIM-карт Аккумуляторы Аккумуляторы для КПК Все для КПК и смартфо. Читаем сам Яndex :-) Сервер входящей почты для PDA-устройств.. 1-го
запуска среда помнит мидлет и отображает вместе с иконкой в MIDlet List.
The page includes a link to a suite of MIDlets that allow the user to browse ACME's product catalog and place orders directly from a Java- enabled cell phone. Intrigued by this prospect, the user activates the link, which causes a request for the target to be sent to ACME's web server. The link in question would look something like this: Figure 3- 1.
Installing MIDlets using OTA provisioning. A HREF="Suite. jad"> Click here< /A> to install the ACME MIDlet suite. As you can see, this link points to the JAD file for the ACME MIDlet suite.
The request to retrieve this file is sent by the cell phone's browser (see step 2 in Figure 3- 1. To enable browsers to easily identify JAD files, the web server is configured to return them with the following MIME type: text/vnd. On receipt of data with this content type, the phone's AMS activates and displays the content of the application descriptor, so that the user can decide whether or not to install the MIDlet suite. At this stage, the user has waited only a relatively short time for the download of the small JAD file. Since this file contains an attribute that corresponds to the size of the JAR file that contains the MIDlets as well as a textual description of the services they provide, the user should be able to choose whether to install them. This is the advantage of providing MIDlet information in both the JAD file and the JAR file manifest. Should the user decide to install the MIDlets, the AMS looks for the MIDlet- Jar- URL attribute in the JAD file and sends a request to that URL for the JAR, which the server should return tagged with the MIME type application/java- archive.
At this point, the MIDlet suite is installed, and the user can select and run the individual MIDlets. Following installation, the AMS may be required to deliver a status report to the provisioning server indicating whether the suite was successfully installed and identifying the reason for failure if it was not.
A PDAP application can access data managed by the PDA device's address
book. A PDAP application is called a PDAlet, which is a variation of the MIDlet
. Так выглядит программа на экране КПК. Из числа эмуляторов, работающих
на КПК, здесь представлены: TAO Intent Java MIDlet manager, IBM J9 WEME .
This report takes the form of a status code and a status message that is sent using an HTTP POST request to the URL given by the MIDlet- Install- Notify attribute in the JAD file. If this attribute is not present, no installation report is sent. Of course, the server must be configured to expect an installation report at the given URL. The server typically uses a servlet or CGI script to save the report along with details of the originator for later use. TIP. If you are not familiar with the HTTP protocol, you'll find a discussion of those parts of it that are supported by MIDP devices, including the POST request, in Chapter 6.
More complete coverage of HTTP can be found in Java Network Programming by Elliotte Rusty Harold (O'Reilly & Associates, Inc.). The status codes and their meanings are listed in Table 3- 3. Status Codes Used to Report Success or Failure of MIDlet Installation. Insufficient memory. Canceled by the user. Loss of network service (because of the network service loss, this report may never get delivered to the server). JAR size mismatch.
Attribute mismatch. Invalid descriptor. As well as implementing the MIDlet discovery and installation service as just described, the AMS software is required to provide the following functionality: MIDlet suite updates.
MIDlet updates are delivered just as the original MIDlet suite is: the user returns to the original server and requests the software as if an installation were being performed. Because the JAD file contains the version number of the associated MIDlet suite, the AMS can determine whether the software already installed is older than that on the server; if it is, the AMS can perform an upgrade, with permission from the user. Equally important, it can avoid downloading the JAR file if the newest version is already installed. MIDlet selection and execution.
The AMS provides the user with a means of selecting an installed MIDlet to run. The exact means by which this is achieved is device- dependent. On a cell phone, a menu item might give the user the ability to launch the AMS, or individual MIDlet suites may be included in the menu itself. On a PDA, MIDlet suites might be available in exactly the same way as native applications. MIDlet removal. The Java application management software is responsible for removing MIDlet suites from the device on user request. MIDlets cannot be removed individually.
Following successful removal, the application manager must also delete any persistent storage resources that were allocated to the MIDlet suite (see for further details). Because MIDlet removal causes loss of persistent data and is therefore almost certainly an irreversible process, the AMS will normally prompt the user for confirmation.
The MIDlet suite vendor can use the MIDlet- Delete- Confirm attribute in the JAD file to include a message that should be displayed to the user before removal. This message can be used to warn the user of the consequences, if any, of removing the MIDlet suite. The Wireless Toolkit Application Management Software.
To prepare a MIDlet suite for remote installation, take the following steps: Install the MIDlet suite JAR file on your web server. Edit the JAD file so that its MIDlet- Jar- URL attribute points to the JAR file. Note that the specification requires that an absolute URL is required in the JAD file; relative URLs are not guaranteed to work. The Wireless Toolkit does not generate a JAD file containing an absolute URL, so you will need to edit it manually.
Place the JAD file on the web server. Create an HTML or WML page with a hypertext link to the JAD file. The hypertext link must use an absolute URL, since application managers are not required to support relative URLs.
Configure the web server so that JAD files are returned with MIME type text/vnd. JAR files with MIME type application/java- archive. The Wireless Toolkit contains a graphical AMS that can be used to test the OTA provisioning of MIDlet suites as well as to provide developers and vendors with a demonstration of typical application management and removal features. To use it, run the emulator provided with the Toolkit from the command line and pass it the argument - Xjam. Assuming you have installed the Wireless Toolkit in the directory c: \j.
DOS starts the emulator and activates the AMS: c: \j. Xjam. When started, the application manager displays the Java logo and a copyright message.