|
The complete application development cycle for the Mobile Information Device Profile (MIDP) environment involves more than just coding and debugging your applications. It's also vital to deploy your application in a way that makes it easy for a user to download and install it, in a process called provisioning. If your application is hard to acquire and install, it won't be a success. While developers are comfortable with using a serial or USB connection to download applications to a wireless device, most users don't have the equipment or the skills to do the same. Users want to download applications wirelessly, the same way they send and receive messages or browse the Internet. This ability is referred to as over-the-air user-initiated provisioning, OTA for short. OTA for MIDP devices was first described in an addendum to the MIDP 1.0 specification, although technically it was not part of the specification itself but just a recommendation by the MIDP 1.0 expert group. This addendum was revised and formally incorporated into the MIDP 2.0 specification. To be MIDP 2.0-compliant, devices must support OTA provisioning, so now is the time to make sure your MIDlets are properly packaged for wireless installation. The easiest way is to use the J2ME Wireless Toolkit, which incorporates a small provisioning server that emulates a production OTA environment. Available in version 2.0 Beta 2 and later versions of the toolkit, this nice feature enables you to get an idea of whether a server will provision a device with your application successfully without the hassle of setting up and configuring a local web server to act as an OTA server. Some MIDP 2.0 features - like the push registry - are available only to applications downloaded via OTA. If your application uses those features, the built-in OTA server is a critical tool of the development process.
To use the OTA server, start the KToolbar application and open an existing project such as the
The AMS's main screen lists MIDlet suites already installed - there will be none the first time you run it, of course. At the top of the list is an item labeled Install Application. Select this item, click the Menu button, and choose Launch from the menu to start the application installer. The installer prompts you for the URL of an HTML file containing a link to the MIDlet suite's Java application descriptor (JAD). KToolbar automatically generates this HTML file for you, placing it in the project's http://localhost:1364/demos/bin/demos.html The first part of the URL is the address of KToolbar's OTA server, which is really just a stripped-down web server. The URL may differ from this example. The installer doesn't care what it's connecting to - you can change the URL if you want to test the installation process from an actual web server, for example.
Click the Menu button and select Go to start the installation process. The installer fetches the HTML file and parses it, looking for links ending in
Once you confirm you want to proceed, the installer fetches the suite's JAR file. The JAR file's location comes from the
The J2ME Wireless Toolkit simplifies OTA testing, but eventually you'll need to test provisioning of actual devices from an actual web server. You'll need to deploy your application on a public server, one that is accessible to the general Internet population, and the server will need to be configured with the following MIME type mappings: the Once the server is properly configured, place the application descriptor and the MIDlet suite on the server and create an HTML page with a link to the JAD. You may also need to create an equivalent WML or XHTML page for microbrowser users - some devices may allow OTA provisioning to be initiated directly from a microbrowser instead of indirectly, through the AMS. Before attempting to install the application on your device, however, test it with the toolkit's emulator. You can launch the emulator in provisioning mode directly, by using the OTA Provisioning item in the J2ME Wireless Toolkit 2.0 folder. Then follow the steps described above, supplying the appropriate URL. Once you've verified that things are working in the emulator, try it on an actual device. Back To Top | |||||
|
| ||||||||||||