What's New in the Sun Java Wireless Toolkit 2.3 beta

Home arrow Mobile & PDA arrow Palm OS arrow What's New in the Sun Java Wireless Toolkit 2.3 beta
What's New in the Sun Java Wireless Toolkit 2.3 beta Print E-mail
Contributed by Joe   
Thursday, 22 June 2006
What's New in the Sun Java Wireless Toolkit 2.3 beta

The Sun Java Wireless Toolkit just keeps getting better. Version 2.3 beta adds support for three new APIs:

  • The Security and Trust Services APIs (SATSA, JSR 177) allow MIDlets to communicate with smard cards and perform cryptographic functions.
  • The Location API (JSR 179) gives MIDlets a way to discover the current location of the device.
  • The Content Handler API (CHAPI, JSR 211) provides a mechanism for launching MIDlets based on the type of content a device receives.
A Toolkit By Any Other Name Would Smell As Sweet
 

The name of the toolkit has changed, but the technology and quality you expect is the same as always. Formerly known as the J2ME Wireless Toolkit, the software is now the Sun Java Wireless Toolkit.

Since its debut in 2000, the toolkit has evolved to keep pace with the rapidly changing face of mobile Java technology. Read on to understand how the Sun Java Wireless Toolkit supports SATSA, the Location API, and CHAPI.

It's Not Just About the APIs
 

This version of the toolkit includes several enhancements besides the new APIs:

You can now create a new project from a JAD and JAR pair. This is useful if you want to edit the decsriptor attributes for an existing MIDlet suite.

  • HTTP authentication is now supported.
  • You can copy and paste text to and from text fields in the emulator. This is surprisingly useful.
  • The MIDlet signing tools have been improved.
  • The API Selection tab of the project settings dialog enforces dependencies between APIs. For example, you can only select the Mobile 3D Graphics API if you have already selected CDLC 1.1.
Smart Cards and MIDP Devices Play Together
 

SATSA includes four distinct APIs. Two of these allow MIDlets to communicate with smart cards, which are sometimes embedded in MIDP devices. Some devices will include slots for smart cards as well. The other two SATSA APIs provide cryptographic signing services and general cryptographic capabilities.

The Sun Java Wireless Toolkit supports all the SATSA APIs. The emulator now includes two simulated card slots. Java Card applications can be simulated with cref, a tool from the Java Card Development Kit that is bundled with the Sun Java Wireless Toolkit.

SATSA offers two APIs for communicating with smart cards. The first provides low-level access based on small pieces of data called Application Protocol Data Units (APDUs). The second is a distributed object protocol, Java Card Remote Method Invocation (JCRMI). Both APIs are fully supported in the toolkit. Better still, you can view APDU and JCRMI communication in the toolkit's network monitor.

The toolkit also supports the other two SATSA APIs, which provide cryptographic services.

To more fully explore the possibilities of SATSA, try the Mohair example application that comes with the toolkit. Check the documentation in Appendix A of the User's Guide for comprehensive instructions on running the MIDlets in Mohair

 Where, Oh Where, Has My Little Device Gone?
 

Next on the menu of newly supported APIs is the Location API. In essence, the Location API allows applications to discover the current location of the device. Many devices now include Global Positioning System (GPS) receivers that are capable of determining position within a few meters. Alternately, some devices may be able to retrieve position information from the radio network.

The Sun Java Wireless Toolkit fully supports the Location API. Of course, the emulator doesn't get to travel beyond the confines of your computer screen, so the location of the emulator is simulated and can be controlled through the External Event Generator window, available from the emulator window menu.

 

You can specify the device's location, its orientation, and you can even specify whether or not the location system is available or not.

For more sophisticated, realistic testing, you can run a script that changes the simulated location of the toolkit over time. The script itself is a simple XML file. See the documentation in the User's Guide for more information.

The toolkit includes an impressive demonstration, CityGuide, that shows off the possibilities of the Location API as well as the simulation features provided by the toolkit.

Make sure you run the included script to enjoy a stroll around the city.

 

Become a Content Wrangler
 

The third API introduced in the 2.3 beta version of the Sun Java Wireless Toolkit is the Content Handler API (CHAPI). CHAPI provides a way to associate MIDlets with specific types of content. When a device receives content via messaging, local networking, or any other method, an appropriate content handler MIDlet can be launched to display or render the content.

The CHAPI specification provides an API as well as additional descriptor headers for mapping content types to MIDlets.

The Sun Java Wireless Toolkit supports CHAPI and provides a new tab in the project settings dialog for configuring content handlers. You can easily map content types and file suffixes to content handler MIDlets.

 

Summary
 

The Sun Java Wireless Toolkit 2.3 beta adds new features and three new APIs to an already long list of capabilities. SATSA provides access to smart card applications and cryptographic services. The Location API allows applications to discover the current location of the device. CHAPI allows MIDlets to respond to specific types of content. The toolkit provides tools to enable developers to create and test applications with the new APIs. Go give it a try!

Last Updated ( Thursday, 22 June 2006 )

  home              contact us

 

©2006-2008 DeveloperZone.biz   All rights reserved     powered by Mambo Designed by Siteground