New improvement of J2ME Wireless Toolkit 2.2

Source: Internet
Author: User
Tags format file system include window root directory
The award-winning J2ME Wireless Toolkit has become the de facto standard toolkit for J2ME development applications. Since its debut for 2000 years, the toolkit has been evolving to catch up with the rapid changes in the appearance of mobile Java technology. Don't be misled by minor changes since version 2.1. The new toolkit supports the new optional API:3D graphics, multimedia communications, Bluetooth networking (Bluetooth networking) and data management as specified in the Java Community Process (JCP) in four critical areas. This article describes these new APIs and shows you how to implement them in the toolkit.

Before that, let's compliment the newer Defaultcolorphone simulator skin, which has had a larger screen (240, or QVGA) and more colors (4096 colors instead of 256 colors) since the 2.1 release.

Move 3D Graphics

JSR 184, the mobile 3D graphics API for J2ME (M3G), provides three-dimensional graphics functionality in an integrated package that supports the most widely used J2ME software stack, limited-Connection device configuration (CLDC), and Mobile Information device description (MIDP) devices. The API provides two APIs for displaying the contents of a three-dimensional content. The immediate mode API enables applications to create and manipulate 3D elements directly. Above this layer is a scene map API, also known as retention mode, that can load early and display the entire 3D scene that has been designed. Applications can take the most appropriate API, or a combination of retention patterns and immediate patterns. The JSR 184 specification also defines a file format-.m3g for the scene map.

The toolkit's emulator fully supports JSR 184, and several MIDlet demonstrate the functionality of the API in the Demo3d project.

Life3d demonstrates the use of immediate mode:




Pogoroo is an interactive demo featuring a leaping kangaroo:




Finally, Retainedmode shows how to load and render the scene map file:




Multimedia communication

J2ME Wireless Toolkit has long supported the 1.1 version of JSR 120, Wireless messaging API (WMA), and the new version supports WMA 2.0 (JSR 205), which extends WMA functionality to include multimedia communications.

In a toolkit, communication occurs in a simulated environment. If you run the emulator multiple times, the applications on the emulator can communicate with each other, and you can exchange messages with the application in the same environment using the handy WMA Console utility of the toolkit. Communications can be in accordance with one of the following three standard protocols: the new Protocol-Multimedia Communications Service (MMS), in the Short messaging Service (SMS service,sms), the cellular broadcast service (cell broadcast Service,cbs), or the Toolkit version 2.2.

You can mark MMS messages and add any collection of files to the message.




Also, Network Monitor can now display MMS messages that the emulator sends or receives.

Bluetooth and OBEX

The J2ME Wireless Toolkit Simulator supports JSR 82, the Java API for Bluetooth, including two separate APIs:

The Bluetooth API provides an interface for Bluetooth wireless networks, including device recovery and data exchange.
The OBEX API allows an application to use the object Exchange (EXCHANGE,OBEX) protocol on Bluetooth or other communication channels.
The toolkit allows you to develop and test applications that use Bluetooth technology even without actual Bluetooth hardware. The toolkit simulates a Bluetooth environment in which you can run multiple emulator instances that can be discovered with each other and exchange data using the Bluetooth API.

Application instance Bluetoothdemo shows how to transfer an image from an emulator to another emulator.

J2ME Wireless Toolkit realizes OBEX transmission via analog Bluetooth and IR connections. The analog IR connection follows the IrDA standard defined by the Infrared Data Association. The toolkit simulates infrared transmission between multiple running emulators.

You can configure Bluetooth and OBEX environments by using the BLUETOOTH/OBEX tag in the toolkit parameters. It controls parameters such as how long an emulator tries to discover other devices in a simulated Bluetooth environment, as well as the maximum packet size. See the Toolkit's User Guide for more detailed information.

Local files and personal information

J2ME Wireless Toolkit supports JSR 75, the PDA Optional Packages for the J2ME Platform, which also includes two separate APIs:

The Fileconnection API provides MIDlet access to the local file system on the device.
Personal Information Management (PIM) optional packages include APIs for manipulating contact lists, schedules, and schedule lists.

A real device might have a local file system that can be accessed by using the Fileconnection API. In the J2ME Wireless Toolkit Simulator, the emulated file system exists as a directory on the hard disk.

Applications that use Fileconnection accessible files are stored in the subdirectory <toolkit>\appdb\<skin>\filesystem., here <toolkit> is J2ME The Wireless Toolkit installation directory,<skin> is the name of the emulator skin. For example, the Defaultcolorphone emulator skin is generated with the installation root directory Root1, containing a Readme file. The full path to the file is <toolkit>\appdb\defaultcolorphone\filesystem\root1\readme.

You can manage the available root directory by selecting MIDlet > External events from the menu type of the emulator window. You will see a small utility window that adds and deletes the root directory. These actions will also generate events for the registered listener object.

On a real device, personal information may be stored in memory in a proprietary format. The emulator uses a directory on the hard disk to store this information, which can be accessed using the PIM API. All information is stored in the &LT;TOOLKIT&GT;\APPDB\PIM directory. Lists are stored in subdirectories of contacts, events, and plan directories. For example, the contact list Contacts is located in the <toolkit>\appdb\pim\contacts\contacts directory.

In the list directory, list items are stored in the standard format specified by Internet Mail Consortium. Contacts are stored in vCard format, and calendar and schedule items are stored in VCalendar format.


Conclusion

J2ME Wireless Toolkit 2.2 is not just an incremental update of an outstanding tool. It includes support for the exciting four new specifications, while defining six new APIs. With the rapid development of the wireless Java technology World, J2ME Wireless Toolkit closely follows the pace of development and contains all the tools you need.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.