Exercise 4: Running the Application Using a Touch Screen Enabled Device EmulatorThis exercise provides instructions for enabling the Sun Java Wireless Toolkit 2.5.2 to run applications in touch screen enabled mode. In this exercise we are going to alter the Wireless Toolkit properties so it can emulate a touch screen device. This will allow us to run and test the behavior of the SVG Rich Components as if it were running on a touch screen device. Background InformationThe Sun Java Wireless Toolkit 2.5.2 and Java ME SDK 3.0The Sun Java Wireless Toolkit 2.5.2 (WTK) that is bundled with NetBeans is a tools set for creating Java applications that run on devices compliant with the Java Technology for the Wireless Industry (JTWI, JSR 185) specification and the Mobile Service Architecture (MSA, JSR 248) specification. It includes build tools, utilities, and a MIDP/CLDC device emulator that supports both touch enabled and standard device emulation. The Java ME SDK 3.0 has just been released and combines the functionality included in the CLDC/MIDP Wireless Toolkit with the Sun Java Toolkit for CDC 1.0 along with many other new features to support development for the broadest possible number of Java enabled devices. NetBeans 6.7 will be bundled with the Java ME SDK 3.0, but only for the Windows platform. The Linux, MacOS and other distros will still include the WTK 2.5.2. Steps to FollowStep 1: Enabling touch screen behavior in the WTK 2.5.2 emulator To activate touch screen emulation in the WTK we have to modify one of the device configurations. In this lab it will be the DefaultColorPhone configuration. The properties of a particular configuration are stored in a file named to represent the type of device: Name_of_device.properties. The property file we need to modify in this excercise is DefaultColorPhone.properties.
Troubleshooting Tip: You can verify the directory location of the WTK by checking the Project Properties of the SVG application we created. Note: If you are using the Java ME SDK 3.0 it is not necessary to modify the properties file to enable touch screen emulation.
Step 2: Running the application and verifying that touch screen behavior is enabled
Step 3: Running the application in the Java ME SDK 3.0 emulator. Note: this is an optional step for those who have the Java ME SDK 3.0 downloaded and installed already. In order to launch the application in the Java ME SDK 3.0 or other touch screen device emulator we need edit the the Project Properties.
SummaryIn this exercise, you learned how to activate the touch screen properties in the WTK 2.5.2. We also verified that the SVG Rich Components were touch enabled in both the WTK 2.5.2 and Java ME SDK 3.0 emulators. The application is now ready to be deployed to SVG capable touch screen devices. |
|
|
||||||||||||