In my previous article in this series, I walked you through the process of installing a mobile device emulator that could be used to emulate a pocket PC environment without your actually having to purchase mobile hardware. In this article, I want to continue the discussion by showing you some techniques for using the emulator.
If you worked through the installation procedure that I described in the previous article, you might have noticed that although there are several Start menu options that are related to the Windows Mobile 6 SDK, none of those menu options allows you to access the Pocket PC emulator. From what I have been told, Microsoft originally intended to give developers the tools to create their own Windows Mobile emulators (those tools still exist) but never intended to provide a preconfigured emulator. Something must have changed over time, though, because the Windows Mobile 6 SDK contains several preconfigured Pocket PC emulators. Those emulators simply are not accessible through the Start menu.
To access the various emulators, open Windows Explorer and navigate through the computer's file system to \Program Files\Mobile Device Emulator\1.0. This folder contains a file named DVCEMUMANAGER. Double click on this file, and Windows will launch the Device Emulator Manager, shown in Figure A.
The Device Emulator Manager gives you access to several preconfigured mobile device emulators.
To launch a particular emulator, simply select the emulator that you want to use and then select the Connect command from the Actions menu. The screen that you see next will vary depending on which emulator you have chosen, but you can see a sample of what one of the emulators looks like in Figure B.
This is what one of the emulators looks like.
I won't bore you with the details of how to use the emulator. The main thing you need to know is that anything you would normally do with a stylus can now be done with your PC's mouse. There are a few actions that need a bit more explaining, though.
In the real world, there are events that occur in relation to a mobile device that have nothing to do with anything that a user might have clicked on the screen. Placing the device in a cradle is an example of such an action. Believe it or not, the emulator allows you to simulate a wide range of external events.
Many external events can be simulated through the Device Emulator Manager. With the emulator running, right click on the listing for the emulator that you are using in the Device Emulator Manager. When you do, you will see options to Connect, Cradle, Uncradle, Shutdown, or Reset the device. The Reset option performs a soft reset on the device, but if you want to simulate a hard reset, you can find an option for doing so on the emulator's File menu.
The device emulator's File menu also contains a Configure option that is worth a look. Selecting the Configure option causes Windows to display the Emulator Properties sheet. This Properties sheet contains a variety of tabs, filled with various configuration options, some of which are more useful than others.
The Properties sheet's Display tab contains two options that I tend to think are useful. One option allows you to double the emulator's size, as shown in Figure C. This option is great for the visually impaired. Another cool option on the Display tab is the Orientation option. This allows you to rotate the emulator, which is great for working on a portrait-style device in landscape mode.
The Display tab allows you to zoom or rotate the emulator window.
The Properties sheet's Network tab is used for setting up device connectivity. By default, emulated mobile devices do not have any connectivity to anything, but you can use the options found on the Network tab to bind emulated network adapters to your PC's physical network adapters.
The Peripherals tab appears useless at first, since the majority of the tab is devoted to mapping serial ports. If you look at the bottom of the image shown in Figure D, however, you can see that there are some useful options on this tab. You can emulate various battery power levels or emulate the existence of a speakerphone, headset or car kit.
The Peripherals tab allows you to emulate the existence of add-on hardware.
As you can see, the various mobile device emulators are very flexible in their capabilities. The emulators can't reproduce every condition found in the real world, but they should be more than adequate for testing purposes.
About the author:
Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server and IIS. Brien has served as CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. As a freelance technical writer, he has written for Microsoft, CNET, ZDNet, TechTarget, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at www.brienposey.com.