Emulating Physical Devices
The J2ME Wireless Toolkit is designed as an all-purpose J2ME development tool suite that is geared toward a wide range of wireless mobile devices. For this reason, you won't find any mention of a specific manufacturer's name or device model in the J2ME Wireless Toolkit. Instead, general device types are supported. More specifically, the J2ME Wireless Toolkit includes device profiles for the following devices:
Pager
Minimum phone
Default gray phone
Default color phone
As you might have guessed, these devices are listed in order of increasing functionality. In other words, the pager and minimum phone device profiles represent devices with less functionality than the default color phone; the default color phone device profile has a larger screen that includes colors. Even so, not all physical devices will have such features, so it can be valuable to test a MIDlet on all of these device profiles. Table 3.1 lists the specific attributes of these device profiles.
Table 3.1 Attributes for the Device Profiles Supported in the J2ME Wireless Toolkit
Device Profile |
Screen Size |
Screen Colors |
Key Set |
# Soft Buttons |
Pager |
150x60 |
black/white |
QWERTY |
0 |
Minimum phone |
96x54 |
black/white |
ITU-T |
0 |
Default gray |
96x128 |
256 grayscale |
ITU-T |
2 phone |
Default color |
96x128 |
256 colors |
ITU-T |
2 phone |
Table 3.1 reveals how much variance is possible in J2ME devices. Notice that the pager has a screen that is horizontally oriented, whereas the phones have vertical screens. Also, the pager and minimum phone have only black and white displays, the gray phone supports 256 shades of gray, and the color phone supports 256 colors. The key sets on the devices vary as well. The pager includes a full QWERTY key set similar to your computer keyboardthis corresponds to the popular alphanumeric pagers such as those produced by Research In Motion (RIM). The ITU-T key set is based upon the familiar keypad commonly found on most mobile phones in use today. Finally, the soft buttons are special buttons that are accessible from MIDlets to perform application functions.
NOTE
ITU stands for International Telecommunication Union, and is the United Nations specialized agency dealing with telecommunications. The ITU is heavily involved in developing and overseeing telecommunications standards.
Although the general devices in the J2ME Wireless Toolkit are valuable for testing MIDlets without regard for specific brands and models of devices, you might want to specifically target a popular phone or pager for testing. In this case, you'll need to obtain the profile for the device. One way to accomplish this is to use the J2ME toolkit made available by the manufacturer of the device in question. As an example, the Motorola SDK for J2ME includes profiles for the following devices:
Generic phone
Motorola iDEN
Motorola iDEN i1000
Motorola StarTac
Aside from the generic phone, the device profiles included in the Motorola toolkit correspond to real products that Motorola has on the market. By testing a MIDlet on these devices within the J2ME emulator, you can more accurately approximate how the MIDlet will function on the real device, particularly how it will look on the device display.