Java Reference
In-Depth Information
To test the push notification, you'll have to package the application, and then deploy it on
the WTK 2.2 emulator. First choose Project TRA Package
Create Package to package the
Run via OTA from the KToolbar menu.
You'll see the emulator pop up, showing its Application Management Software (AMS). Select
Install Application, and then accept the URL that is supplied. KToolbar contains a small OTA
server; the URL is automatically preloaded when you select Run via OTA. You will see a series
of other prompts about installing the application; just say yes to everything. Eventually the
installation succeeds and you will see the MIDlet PatchyMIDlet listed in the emulator's menu.
The emulator is now running, listening for incoming connections, even though no MIDlets
are running.
Now test PatchyMIDlet by pointing your browser to http://localhost/ . PatchyMIDlet will
be launched and will send a response to the browser. (The emulator will ask if it's okay to send
data back on the network; you'll have to say yes.) Figure 10-6 shows the emulator running
PatchyMIDlet and a browser showing its output.
project into a MIDlet suite JAR. Then choose Project
Figure 10-6. PatchyMIDlet, a small web server
Search WWH ::




Custom Search